Skip to content

Commit d01f7fe

Browse files
authored
Merge pull request #3636 from topcoder-platform/commit-conventional
Commit conventional issue #3634
2 parents fabeb26 + 9fff118 commit d01f7fe

File tree

8 files changed

+8411
-7769
lines changed

8 files changed

+8411
-7769
lines changed

.commitlintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.github/workflows/commitlint.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Commitlint
2+
on: [pull_request]
3+
4+
jobs:
5+
commit-lint:
6+
runs-on: ubuntu-latest
7+
env:
8+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
- uses: wagoid/[email protected]
14+
with:
15+
configFile: './.commitlintrc.yml'

.huskyrc.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"hooks": {
3+
"commit-msg": "npm run commitlint"
4+
}
5+
}

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<a name="1.0.0"></a>
2+
# [1.0.0](https://github.com/topcoder-platform/community-app/compare/v0.18.23...v1.0.0) (2020-02-03)
3+
4+
5+

CONTRIBUTING.md

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Contributing
2+
3+
We would love for you to contribute to the community app :rocket:
4+
5+
- [Commit Message Guidelines](#commit)
6+
7+
## <a name="commit"></a> Commit Message Guidelines
8+
9+
We now have very precise rules over how our git commit messages can be formatted. This leads to **more
10+
readable messages** that are easy to follow when looking through the **project history**. But also,
11+
we use the git commit messages to **generate the change log**.
12+
13+
### Commit Message Format
14+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
15+
format that includes a **type**, a **scope** and a **subject**:
16+
17+
```
18+
<type>(<scope>): <subject>
19+
<BLANK LINE>
20+
<body>
21+
<BLANK LINE>
22+
<footer>
23+
```
24+
25+
The **header** is mandatory and the **scope** of the header is optional.
26+
27+
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
28+
to read on GitHub as well as in various git tools.
29+
30+
### Revert
31+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of
32+
the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is
33+
the SHA of the commit being reverted.
34+
35+
### Type
36+
Must be one of the following:
37+
38+
* **feat**: A new feature
39+
* **fix**: A bug fix
40+
* **docs**: Documentation only changes
41+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
42+
semi-colons, etc)
43+
* **refactor**: A code change that neither fixes a bug nor adds a feature
44+
* **perf**: A code change that improves performance
45+
* **test**: Adding missing tests or correcting existing tests
46+
* **build**: Changes that affect the build system, CI configuration or external dependencies
47+
(example scopes: gulp, broccoli, npm)
48+
* **chore**: Other changes that don't modify `src` or `test` files
49+
* **release**: Release version commit
50+
51+
### Scope
52+
The scope could be anything specifying place of the commit change. For example
53+
`login`, `profile`, `challenge-listing`, `challenge-detail` etc.
54+
55+
### Subject
56+
The subject contains succinct description of the change:
57+
58+
* use the imperative, present tense: "change" not "changed" nor "changes"
59+
* don't capitalize first letter
60+
* no dot (.) at the end
61+
62+
### Body
63+
Optional. Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
64+
The body should include the motivation for the change and contrast this with previous behavior.
65+
66+
### Footer
67+
Optional. The footer should contain any information about **Breaking Changes** and is also the place to
68+
reference GitHub issues that this commit **Closes**.
69+
70+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.
71+
The rest of the commit message is then used for this.

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,12 @@ given credentials relate to.
190190
* **XXX**_TC_M2M_CLIENT_SECRET
191191
* **XXX**_TC_M2M_AUDIENCE
192192
* **XXX**_TC_M2M_GRANT_TYPE
193+
194+
195+
### Changelog
196+
197+
[https://github.com/topcoder-platform/community-app/blob/master/CHANGELOG.md](Check the latest changes)
198+
199+
### Submitting Changes
200+
201+
Please check the [https://github.com/topcoder-platform/community-app/blob/master/CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on rules to be followed.

0 commit comments

Comments
 (0)