-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: 🔧switched to standard-version (#15)
- Loading branch information
Showing
9 changed files
with
1,686 additions
and
1,594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Run commitlint on Pull Requests and commits | ||
name: commitlint | ||
on: | ||
pull_request: | ||
types: ['opened', 'edited', 'reopened', 'synchronize'] | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
|
||
jobs: | ||
lint-pull-request-name: | ||
# Only on pull requests | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- run: npm i @commitlint/config-conventional | ||
- uses: JulienKode/pull-request-name-linter-action@v0.1.2 | ||
lint-commits: | ||
# Only if we are pushing or merging PR to the master | ||
if: (github.event_name == 'pull_request' && github.base_ref == 'refs/heads/master') || github.event_name == 'push' | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 30 # Its fine to lint last 30 commits only | ||
- run: npm i @commitlint/config-conventional | ||
- uses: wagoid/commitlint-github-action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const internalSection = `_Internals (This section should NOT concern the template users)_`; | ||
/* | ||
* Used for creating CHANGELOG.md automatically. | ||
* Anything under the internalSection should be boilerplate internals | ||
* and shouldn't interest the end users, meaning that the template shouldn't be effected. | ||
*/ | ||
|
||
// Check the descriptions of the types -> https://github.com/commitizen/conventional-commit-types/blob/master/index.json | ||
module.exports = { | ||
types: [ | ||
{ type: 'feat', section: 'Features', hidden: false }, | ||
{ type: 'fix', section: 'Bug Fixes', hidden: false }, | ||
{ type: 'docs', section: 'Documentation', hidden: false }, | ||
{ type: 'perf', section: 'Performance Updates', hidden: false }, | ||
|
||
// Other changes that don't modify src or test files | ||
{ type: 'chore', section: internalSection, hidden: false }, | ||
|
||
// Adding missing tests or correcting existing tests | ||
{ type: 'test', section: internalSection, hidden: false }, | ||
|
||
// Changes to our CI configuration files and scripts | ||
{ type: 'ci', section: internalSection, hidden: false }, | ||
|
||
// A code change that neither fixes a bug nor adds a feature | ||
{ type: 'refactor', section: internalSection, hidden: false }, | ||
|
||
// Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | ||
{ type: 'style', section: internalSection, hidden: false }, | ||
], | ||
skip: { | ||
commit: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; | ||
// Use types from .versionrc.js so that when generating CHANGELOG there are no inconsistencies | ||
const standardVersionTypes = require('./.versionrc').types; | ||
const typeEnums = standardVersionTypes.map(t => t.type); | ||
|
||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'type-enum': [2, 'always', typeEnums], | ||
}, | ||
}; |
Oops, something went wrong.