mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2025-11-07 16:06:56 +00:00
Merge remote-tracking branch 'upstream/master' into ff
This commit is contained in:
commit
d097cca859
26 changed files with 2413 additions and 14539 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
node_modules
|
node_modules
|
||||||
commitlint.config.js
|
commitlint.config.mjs
|
||||||
action.yml
|
action.yml
|
||||||
.github
|
.github
|
||||||
CHANGELOG.md
|
CHANGELOG.md
|
||||||
|
|
|
||||||
|
|
@ -19,5 +19,10 @@
|
||||||
"node/no-unpublished-require": "off",
|
"node/no-unpublished-require": "off",
|
||||||
"node/no-unpublished-import": "off",
|
"node/no-unpublished-import": "off",
|
||||||
"node/no-unsupported-features/es-syntax": "off"
|
"node/no-unsupported-features/es-syntax": "off"
|
||||||
}
|
},
|
||||||
|
"ignorePatterns": [
|
||||||
|
".github/tasks/actionYamlUpdater.js",
|
||||||
|
"rollup.config.js",
|
||||||
|
"fixtures"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
|
|
@ -11,6 +11,12 @@ updates:
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
open-pull-requests-limit: 99
|
open-pull-requests-limit: 99
|
||||||
|
groups:
|
||||||
|
minor-and-patch:
|
||||||
|
applies-to: version-updates
|
||||||
|
update-types:
|
||||||
|
- "patch"
|
||||||
|
- "minor"
|
||||||
|
|
||||||
- package-ecosystem: docker
|
- package-ecosystem: docker
|
||||||
directory: /
|
directory: /
|
||||||
|
|
|
||||||
4
.github/tasks/actionYamlUpdater.js
vendored
4
.github/tasks/actionYamlUpdater.js
vendored
|
|
@ -3,10 +3,10 @@ const yaml = require('yaml')
|
||||||
|
|
||||||
const versionRegex = /\d+\.\d+\.\d+/
|
const versionRegex = /\d+\.\d+\.\d+/
|
||||||
|
|
||||||
module.exports.readVersion = (contents) =>
|
exports.readVersion = (contents) =>
|
||||||
yaml.parse(contents).runs.image.match(versionRegex)[0]
|
yaml.parse(contents).runs.image.match(versionRegex)[0]
|
||||||
|
|
||||||
module.exports.writeVersion = (contents, version) => {
|
exports.writeVersion = (contents, version) => {
|
||||||
const actionFile = yaml.parse(contents)
|
const actionFile = yaml.parse(contents)
|
||||||
actionFile.runs.image = actionFile.runs.image.replace(versionRegex, version)
|
actionFile.runs.image = actionFile.runs.image.replace(versionRegex, version)
|
||||||
|
|
||||||
|
|
|
||||||
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
|
|
@ -35,8 +35,10 @@ jobs:
|
||||||
env:
|
env:
|
||||||
DOCKER_REGISTRY_URL: registry.hub.docker.com
|
DOCKER_REGISTRY_URL: registry.hub.docker.com
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v4
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '20.9.0'
|
node-version: '20.9.0'
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v4
|
||||||
|
|
@ -53,7 +55,13 @@ jobs:
|
||||||
git config user.email 'github-action@users.noreply.github.com'
|
git config user.email 'github-action@users.noreply.github.com'
|
||||||
git config user.name 'GitHub Action'
|
git config user.name 'GitHub Action'
|
||||||
- name: Update versions and changelog
|
- name: Update versions and changelog
|
||||||
run: npx commit-and-tag-version
|
run: |
|
||||||
|
# remove `"type": "module"` from package.json since `commit-and-tag-version` doesn't support it
|
||||||
|
sed -i '/"type": "module",/c\' package.json
|
||||||
|
npx commit-and-tag-version
|
||||||
|
# bring back `"type": "module"`
|
||||||
|
sed -i 's/"private": true,/"private": true,\n "type": "module",/' package.json
|
||||||
|
git commit --amend --no-edit
|
||||||
- name: Set VERSION env var
|
- name: Set VERSION env var
|
||||||
run: |
|
run: |
|
||||||
version=`node -p "require('./package.json').version"`
|
version=`node -p "require('./package.json').version"`
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports = {
|
export default {
|
||||||
'*.{ts,tsx,vue,css,less,scss,html,htm,md,markdown}': 'prettier --write',
|
'*.{ts,tsx,vue,css,less,scss,html,htm,md,markdown}': 'prettier --write',
|
||||||
'*.{json,yml,yaml}': ['prettier --write', () => 'npm run test'],
|
'*.{json,yml,yaml}': ['prettier --write', () => 'npm run test'],
|
||||||
'*.{js,jsx}': ['eslint --fix', () => 'npm run test'],
|
'*.{js,jsx}': ['eslint --fix', () => 'npm run test'],
|
||||||
811
CHANGELOG.md
811
CHANGELOG.md
|
|
@ -2,13 +2,92 @@
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
||||||
|
|
||||||
## 5.4.5 (2024-01-08)
|
## [6.0.1](https://github.com/wagoid/commitlint-github-action/compare/v6.0.0...v6.0.1) (2024-04-10)
|
||||||
|
|
||||||
## 5.4.4 (2023-11-01)
|
## [6.0.0](https://github.com/wagoid/commitlint-github-action/compare/v5.5.1...v6.0.0) (2024-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
### ⚠ BREAKING CHANGES
|
||||||
|
|
||||||
|
* `commitlint.config.js` is not supported anymore, please use `.mjs` extension
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* upgrade to commitlint v19 ([732f0ad](https://github.com/wagoid/commitlint-github-action/commit/732f0ad7d5fc8650d54cbdbb9183a4e40f3e9ed8))
|
||||||
|
|
||||||
|
## [5.5.1](https://github.com/wagoid/commitlint-github-action/compare/v5.5.0...v5.5.1) (2024-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* upgrade commitlint to latest v18 ([6ee28c9](https://github.com/wagoid/commitlint-github-action/commit/6ee28c93002746f39d5d3f364b4d02e3b10600a1)), closes [#760](https://github.com/wagoid/commitlint-github-action/issues/760)
|
||||||
|
|
||||||
|
## [5.5.0](https://github.com/wagoid/commitlint-github-action/compare/v5.4.5...v5.5.0) (2024-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* upgrade commitlint to latest version ([2ff45dc](https://github.com/wagoid/commitlint-github-action/commit/2ff45dc12063297947621e4f7e0b4e53b17fd6ed))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* rollback update of commitlint to support configs that use commonjs ([06143b2](https://github.com/wagoid/commitlint-github-action/commit/06143b235b3cbc9b59880866cf547f9b7b52b79c))
|
||||||
|
|
||||||
|
## [5.4.6](https://github.com/wagoid/commitlint-github-action/compare/v5.4.5...v5.4.6) (2024-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* upgrade commitlint to latest version ([2ff45dc](https://github.com/wagoid/commitlint-github-action/commit/2ff45dc12063297947621e4f7e0b4e53b17fd6ed))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [5.4.5](https://github.com/wagoid/commitlint-github-action/compare/v5.4.4...v5.4.5) (2024-01-08)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [5.4.4](https://github.com/wagoid/commitlint-github-action/compare/v5.4.3...v5.4.4) (2023-11-01)
|
||||||
|
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* **deps:** update node version to 20.9.0 ([a8947aa](https://github.com/wagoid/commitlint-github-action/commit/a8947aa26c352af658d2e36b9ac24f245ef5c0f1))
|
||||||
|
* **deps:** upgrade commitlint packages ([fc3ebae](https://github.com/wagoid/commitlint-github-action/commit/fc3ebae70922434a73e7e0abdf88ee1ed109bf1b))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* **deps:** action now runs on commitlint 18
|
||||||
|
* **deps:** action now runs on Node 20.9.0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [5.4.3](https://github.com/wagoid/commitlint-github-action/compare/v5.4.2...v5.4.3) (2023-07-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* make sure action passes when event doesn't have commits fixes [#746](https://github.com/wagoid/commitlint-github-action/issues/746) ([6249453](https://github.com/wagoid/commitlint-github-action/commit/624945381bc1ad25d7df26e7fe07ebfe98e763f1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [5.4.2](https://github.com/wagoid/commitlint-github-action/compare/v5.4.1...v5.4.2) (2023-07-22)
|
||||||
|
|
||||||
|
|
||||||
|
* feat!: use github event payload and API to list commits resolves #456 ([a31f4b5](https://github.com/wagoid/commitlint-github-action/commit/a31f4b57934da285bea117cbd95f5e32ec6f5536)), closes [#456](https://github.com/wagoid/commitlint-github-action/issues/456)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* list up to 100 commits at once resolves [#717](https://github.com/wagoid/commitlint-github-action/issues/717) ([2be323b](https://github.com/wagoid/commitlint-github-action/commit/2be323bc447ae46dae3c61171525e091f31d42c3))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* "firstParent" option has been removed
|
||||||
|
|
||||||
## 5.4.3 (2023-07-23)
|
|
||||||
|
|
||||||
## 5.4.2 (2023-07-22)
|
|
||||||
|
|
||||||
## [5.4.1](https://github.com/wagoid/commitlint-github-action/compare/v5.4.0...v5.4.1) (2023-04-11)
|
## [5.4.1](https://github.com/wagoid/commitlint-github-action/compare/v5.4.0...v5.4.1) (2023-04-11)
|
||||||
|
|
||||||
|
|
@ -19,405 +98,537 @@ All notable changes to this project will be documented in this file. See [commit
|
||||||
* **action:** move info sequence for failonerrors ([d4e1e80](https://github.com/wagoid/commitlint-github-action/commit/d4e1e800cd5f24869c63b725ca461da53cc8b419))
|
* **action:** move info sequence for failonerrors ([d4e1e80](https://github.com/wagoid/commitlint-github-action/commit/d4e1e800cd5f24869c63b725ca461da53cc8b419))
|
||||||
* **action:** move info sequence for failonerrors ([00cf650](https://github.com/wagoid/commitlint-github-action/commit/00cf65022ffbecf121f0ac4d7158772d57e35735))
|
* **action:** move info sequence for failonerrors ([00cf650](https://github.com/wagoid/commitlint-github-action/commit/00cf65022ffbecf121f0ac4d7158772d57e35735))
|
||||||
* **action:** removed unnecessary setOutput call ([0a35ed4](https://github.com/wagoid/commitlint-github-action/commit/0a35ed499e45918fc5e3735b85e015a20bb82177))
|
* **action:** removed unnecessary setOutput call ([0a35ed4](https://github.com/wagoid/commitlint-github-action/commit/0a35ed499e45918fc5e3735b85e015a20bb82177))
|
||||||
* **action:** use dockerfile ([6a86716](https://github.com/wagoid/commitlint-github-action/commit/6a86716a7909116c765c7b750983a1eb5944a54f))
|
|
||||||
* **action:** use dockerfile ([0561ba8](https://github.com/wagoid/commitlint-github-action/commit/0561ba89620ef690e74a82f00c378aa655a86490))
|
* **action:** use dockerfile ([0561ba8](https://github.com/wagoid/commitlint-github-action/commit/0561ba89620ef690e74a82f00c378aa655a86490))
|
||||||
* error when producing outputs ([7cb77e4](https://github.com/wagoid/commitlint-github-action/commit/7cb77e425dda71d2512c16a9114a450a553b3270))
|
|
||||||
|
|
||||||
## [5.4.0](https://github.com/wagoid/commitlint-github-action/compare/v5.3.1...v5.4.0) (2023-04-10)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- **action:** adds flag to optionally fail on errors ([83467da](https://github.com/wagoid/commitlint-github-action/commit/83467da07bcf182bf7dead9d98090d358bb760d8))
|
# [5.4.0](https://github.com/wagoid/commitlint-github-action/compare/v5.3.1...v5.4.0) (2023-04-10)
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
- **action:** add field to action ([8589bb7](https://github.com/wagoid/commitlint-github-action/commit/8589bb7e04b6baba23e93083597321c592b18593))
|
* **action:** add field to action ([8589bb7](https://github.com/wagoid/commitlint-github-action/commit/8589bb7e04b6baba23e93083597321c592b18593))
|
||||||
- **action:** fix bug with value, add tests ([2640e4c](https://github.com/wagoid/commitlint-github-action/commit/2640e4c8bf1ef522aea0d9fa997c4f07ee95ba97))
|
* **action:** fix bug with value, add tests ([2640e4c](https://github.com/wagoid/commitlint-github-action/commit/2640e4c8bf1ef522aea0d9fa997c4f07ee95ba97))
|
||||||
- **action:** refactor a value, add to docs ([7991e57](https://github.com/wagoid/commitlint-github-action/commit/7991e57b35c9a86cdda880119d9c4ca3b975b4fd))
|
* **action:** refactor a value, add to docs ([7991e57](https://github.com/wagoid/commitlint-github-action/commit/7991e57b35c9a86cdda880119d9c4ca3b975b4fd))
|
||||||
- **docs:** remove dupe ([6a9739b](https://github.com/wagoid/commitlint-github-action/commit/6a9739b9a2f47cb6e51a850b6e82fa9c42a13f61))
|
* **docs:** remove dupe ([6a9739b](https://github.com/wagoid/commitlint-github-action/commit/6a9739b9a2f47cb6e51a850b6e82fa9c42a13f61))
|
||||||
- **tests:** remove log ([097b726](https://github.com/wagoid/commitlint-github-action/commit/097b726807006a63d6f34782aad667815f4217dc))
|
* **tests:** remove log ([097b726](https://github.com/wagoid/commitlint-github-action/commit/097b726807006a63d6f34782aad667815f4217dc))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **action:** adds flag to optionally fail on errors ([83467da](https://github.com/wagoid/commitlint-github-action/commit/83467da07bcf182bf7dead9d98090d358bb760d8))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [5.3.1](https://github.com/wagoid/commitlint-github-action/compare/v5.3.0...v5.3.1) (2023-02-15)
|
## [5.3.1](https://github.com/wagoid/commitlint-github-action/compare/v5.3.0...v5.3.1) (2023-02-15)
|
||||||
|
|
||||||
## [5.3.0](https://github.com/wagoid/commitlint-github-action/compare/v5.2.2...v5.3.0) (2022-11-24)
|
|
||||||
|
|
||||||
|
# [5.3.0](https://github.com/wagoid/commitlint-github-action/compare/v5.2.2...v5.3.0) (2022-11-24)
|
||||||
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- adds commitDepth as new input param ([b0982e3](https://github.com/wagoid/commitlint-github-action/commit/b0982e3b0a9fd9398bcfdf10c12df058bb8ffaf2))
|
* adds commitDepth as new input param ([b0982e3](https://github.com/wagoid/commitlint-github-action/commit/b0982e3b0a9fd9398bcfdf10c12df058bb8ffaf2))
|
||||||
|
|
||||||
### [5.2.2](https://github.com/wagoid/commitlint-github-action/compare/v5.2.1...v5.2.2) (2022-10-24)
|
|
||||||
|
|
||||||
### [5.2.1](https://github.com/wagoid/commitlint-github-action/compare/v5.2.0...v5.2.1) (2022-10-24)
|
|
||||||
|
|
||||||
## [5.2.0](https://github.com/wagoid/commitlint-github-action/compare/v5.1.2...v5.2.0) (2022-10-08)
|
## [5.2.2](https://github.com/wagoid/commitlint-github-action/compare/v5.2.1...v5.2.2) (2022-10-24)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [5.2.1](https://github.com/wagoid/commitlint-github-action/compare/v5.2.0...v5.2.1) (2022-10-24)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [5.2.0](https://github.com/wagoid/commitlint-github-action/compare/v5.1.2...v5.2.0) (2022-10-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* add conventional-changelog-conventionalcommits dependency to fix [#552](https://github.com/wagoid/commitlint-github-action/issues/552) ([b584ba3](https://github.com/wagoid/commitlint-github-action/commit/b584ba3e8df77995e7e1858cac45eea8e203e0aa))
|
||||||
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- **deps:** update [@commitlint](https://github.com/commitlint) packages from 17.0 to 17.1 ([d23c330](https://github.com/wagoid/commitlint-github-action/commit/d23c330a95e9e3bead8cbab20e1fbe072bdaeec9))
|
* **deps:** update [@commitlint](https://github.com/commitlint) packages from 17.0 to 17.1 ([d23c330](https://github.com/wagoid/commitlint-github-action/commit/d23c330a95e9e3bead8cbab20e1fbe072bdaeec9))
|
||||||
- **deps:** update commitlint-config-jira and commitlint-config-jira-rules to 1.6.4 ([8b8230b](https://github.com/wagoid/commitlint-github-action/commit/8b8230b1f5be718edfe694137f7af2843c8617fa))
|
* **deps:** update commitlint-config-jira and commitlint-config-jira-rules to 1.6.4 ([8b8230b](https://github.com/wagoid/commitlint-github-action/commit/8b8230b1f5be718edfe694137f7af2843c8617fa))
|
||||||
- **deps:** update commitlint-plugin-function-rules to 1.7.1 ([c2981f1](https://github.com/wagoid/commitlint-github-action/commit/c2981f157c76acf9bc11bc5d3d278140b642aa8f))
|
* **deps:** update commitlint-plugin-function-rules to 1.7.1 ([c2981f1](https://github.com/wagoid/commitlint-github-action/commit/c2981f157c76acf9bc11bc5d3d278140b642aa8f))
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- add conventional-changelog-conventionalcommits dependency to fix [#552](https://github.com/wagoid/commitlint-github-action/issues/552) ([b584ba3](https://github.com/wagoid/commitlint-github-action/commit/b584ba3e8df77995e7e1858cac45eea8e203e0aa))
|
|
||||||
|
|
||||||
### [5.1.2](https://github.com/wagoid/commitlint-github-action/compare/v5.1.1...v5.1.2) (2022-10-06)
|
## [5.1.2](https://github.com/wagoid/commitlint-github-action/compare/v5.1.1...v5.1.2) (2022-10-06)
|
||||||
|
|
||||||
### [5.1.1](https://github.com/wagoid/commitlint-github-action/compare/v5.1.0...v5.1.1) (2022-10-06)
|
|
||||||
|
|
||||||
## [5.1.0](https://github.com/wagoid/commitlint-github-action/compare/v5.0.2...v5.1.0) (2022-10-06)
|
|
||||||
|
## [5.1.1](https://github.com/wagoid/commitlint-github-action/compare/v5.1.0...v5.1.1) (2022-10-06)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [5.1.0](https://github.com/wagoid/commitlint-github-action/compare/v5.0.2...v5.1.0) (2022-10-06)
|
||||||
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- add @commitlint/ensure so that users of the action can use it too ([21c37a5](https://github.com/wagoid/commitlint-github-action/commit/21c37a524217629f2486c3f38a88b1628bf78d87))
|
* add @commitlint/ensure so that users of the action can use it too ([21c37a5](https://github.com/wagoid/commitlint-github-action/commit/21c37a524217629f2486c3f38a88b1628bf78d87))
|
||||||
|
|
||||||
### [5.0.2](https://github.com/wagoid/commitlint-github-action/compare/v5.0.1...v5.0.2) (2022-06-28)
|
|
||||||
|
|
||||||
### [5.0.1](https://github.com/wagoid/commitlint-github-action/compare/v5.0.0...v5.0.1) (2022-06-18)
|
|
||||||
|
|
||||||
## [5.0.0](https://github.com/wagoid/commitlint-github-action/compare/v4.1.15...v5.0.0) (2022-06-16)
|
## [5.0.2](https://github.com/wagoid/commitlint-github-action/compare/v5.0.1...v5.0.2) (2022-06-28)
|
||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
|
||||||
|
|
||||||
- chore: rename circleci windows job
|
|
||||||
- requires lerna v5
|
## [5.0.1](https://github.com/wagoid/commitlint-github-action/compare/v5.0.0...v5.0.1) (2022-06-18)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [5.0.0](https://github.com/wagoid/commitlint-github-action/compare/v4.1.15...v5.0.0) (2022-06-16)
|
||||||
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- upgrade [@commitlint](https://github.com/commitlint) packages ([91c000c](https://github.com/wagoid/commitlint-github-action/commit/91c000c1e080c9c04bf3c2c139acf4a8cd2f98c9))
|
* upgrade [@commitlint](https://github.com/commitlint) packages ([91c000c](https://github.com/wagoid/commitlint-github-action/commit/91c000c1e080c9c04bf3c2c139acf4a8cd2f98c9))
|
||||||
|
|
||||||
### [4.1.15](https://github.com/wagoid/commitlint-github-action/compare/v4.1.14...v4.1.15) (2022-06-16)
|
|
||||||
|
|
||||||
### [4.1.14](https://github.com/wagoid/commitlint-github-action/compare/v4.1.13...v4.1.14) (2022-06-16)
|
|
||||||
|
|
||||||
### [4.1.13](https://github.com/wagoid/commitlint-github-action/compare/v4.1.12...v4.1.13) (2022-06-16)
|
|
||||||
|
|
||||||
### [4.1.12](https://github.com/wagoid/commitlint-github-action/compare/v4.1.11...v4.1.12) (2022-05-07)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- set workspace directory as safe in the entrypoint ([ce9a8cb](https://github.com/wagoid/commitlint-github-action/commit/ce9a8cb8ca913ad31123ebcfb3ce88061fe7108e)), closes [/github.com/actions/checkout/issues/760#issuecomment-1098135955](https://github.com/wagoid//github.com/actions/checkout/issues/760/issues/issuecomment-1098135955)
|
|
||||||
|
|
||||||
### [4.1.11](https://github.com/wagoid/commitlint-github-action/compare/v4.1.10...v4.1.11) (2022-04-06)
|
|
||||||
|
|
||||||
### [4.1.10](https://github.com/wagoid/commitlint-github-action/compare/v4.1.9...v4.1.10) (2022-04-01)
|
|
||||||
|
|
||||||
### [4.1.9](https://github.com/wagoid/commitlint-github-action/compare/v4.1.8...v4.1.9) (2021-10-11)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- use helpUrl from config when present ([6f0b49b](https://github.com/wagoid/commitlint-github-action/commit/6f0b49bb7b70977c2f0ea471a0282d21d5a8aab5)), closes [#234](https://github.com/wagoid/commitlint-github-action/issues/234)
|
|
||||||
|
|
||||||
### [4.1.8](https://github.com/wagoid/commitlint-github-action/compare/v4.1.7...v4.1.8) (2021-10-11)
|
|
||||||
|
|
||||||
### [4.1.7](https://github.com/wagoid/commitlint-github-action/compare/v4.1.6...v4.1.7) (2021-10-11)
|
|
||||||
|
|
||||||
### [4.1.6](https://github.com/wagoid/commitlint-github-action/compare/v4.1.5...v4.1.6) (2021-10-11)
|
|
||||||
|
|
||||||
### [4.1.5](https://github.com/wagoid/commitlint-github-action/compare/v4.1.4...v4.1.5) (2021-10-01)
|
|
||||||
|
|
||||||
### [4.1.4](https://github.com/wagoid/commitlint-github-action/compare/v4.1.3...v4.1.4) (2021-09-11)
|
|
||||||
|
|
||||||
### [4.1.3](https://github.com/wagoid/commitlint-github-action/compare/v4.1.2...v4.1.3) (2021-09-11)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- action failing to check footer of a single commit ([961b6d4](https://github.com/wagoid/commitlint-github-action/commit/961b6d4cd7565e86ea5e28bcb015042ae2022f4f)), closes [#187](https://github.com/wagoid/commitlint-github-action/issues/187)
|
|
||||||
- vulnerabilities from npm audit ([bf83d2b](https://github.com/wagoid/commitlint-github-action/commit/bf83d2b35c4177779d047f464b48d9907f2c5201))
|
|
||||||
|
|
||||||
### [4.1.2](https://github.com/wagoid/commitlint-github-action/compare/v4.1.1...v4.1.2) (2021-09-11)
|
|
||||||
|
|
||||||
### [4.1.1](https://github.com/wagoid/commitlint-github-action/compare/v4.1.0...v4.1.1) (2021-07-17)
|
|
||||||
|
|
||||||
## [4.1.0](https://github.com/wagoid/commitlint-github-action/compare/v4.0.3...v4.1.0) (2021-07-17)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- officially support commitlint-plugin-function-rules ([d6d6fc0](https://github.com/wagoid/commitlint-github-action/commit/d6d6fc0ae0ec45f7b495ae44a78ec5499877ae0d)), closes [#196](https://github.com/wagoid/commitlint-github-action/issues/196)
|
|
||||||
|
|
||||||
### [4.0.3](https://github.com/wagoid/commitlint-github-action/compare/v4.0.2...v4.0.3) (2021-07-17)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- build the action with rollup ([2e57812](https://github.com/wagoid/commitlint-github-action/commit/2e578124a54b446aaf8dfa6d7c71d92e2d6a3de7)), closes [#194](https://github.com/wagoid/commitlint-github-action/issues/194)
|
|
||||||
|
|
||||||
### [4.0.2](https://github.com/wagoid/commitlint-github-action/compare/v4.0.1...v4.0.2) (2021-07-15)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- default to .cjs extension in config files ([5b6cd1b](https://github.com/wagoid/commitlint-github-action/commit/5b6cd1b23af3fcd4e6df552d48cc01dff41262dd))
|
|
||||||
|
|
||||||
### [4.0.1](https://github.com/wagoid/commitlint-github-action/compare/v4.0.0...v4.0.1) (2021-07-15)
|
|
||||||
|
|
||||||
## [4.0.0](https://github.com/wagoid/commitlint-github-action/compare/v3.1.4...v4.0.0) (2021-07-15)
|
|
||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
|
||||||
|
|
||||||
- Node.js version used on the action updated from 12 to
|
|
||||||
16
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- update dependencies that needed to switch to ESM syntax ([5463926](https://github.com/wagoid/commitlint-github-action/commit/5463926c07584c419d865a3fc9efdb382be54995))
|
|
||||||
- upgrade to node.js 16 to support ES modules by default ([30d514f](https://github.com/wagoid/commitlint-github-action/commit/30d514f252505053d2e65896a0865ff0302b7233))
|
|
||||||
|
|
||||||
### [3.1.4](https://github.com/wagoid/commitlint-github-action/compare/v3.1.3...v3.1.4) (2021-05-19)
|
|
||||||
|
|
||||||
### [3.1.3](https://github.com/wagoid/commitlint-github-action/compare/v3.1.2...v3.1.3) (2021-05-10)
|
|
||||||
|
|
||||||
### [3.1.2](https://github.com/wagoid/commitlint-github-action/compare/v3.1.1...v3.1.2) (2021-05-08)
|
|
||||||
|
|
||||||
### [3.1.1](https://github.com/wagoid/commitlint-github-action/compare/v3.1.0...v3.1.1) (2021-05-04)
|
|
||||||
|
|
||||||
## [3.1.0](https://github.com/wagoid/commitlint-github-action/compare/v3.0.8...v3.1.0) (2021-04-06)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- add support for pull_request_target event ([de51303](https://github.com/wagoid/commitlint-github-action/commit/de513030467551ee03fb8827bd790967fd5818ab))
|
|
||||||
|
|
||||||
### [3.0.8](https://github.com/wagoid/commitlint-github-action/compare/v3.0.7...v3.0.8) (2021-04-05)
|
|
||||||
|
|
||||||
### [3.0.7](https://github.com/wagoid/commitlint-github-action/compare/v3.0.6...v3.0.7) (2021-04-01)
|
|
||||||
|
|
||||||
### [3.0.6](https://github.com/wagoid/commitlint-github-action/compare/v3.0.5...v3.0.6) (2021-03-02)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- perform an atomic push when releasing ([9d00d1e](https://github.com/wagoid/commitlint-github-action/commit/9d00d1e75718143215dbf95c9c12956c56225e90))
|
|
||||||
|
|
||||||
### [3.0.5](https://github.com/wagoid/commitlint-github-action/compare/v3.0.3...v3.0.5) (2021-03-02)
|
|
||||||
|
|
||||||
### [3.0.4](https://github.com/wagoid/commitlint-github-action/compare/v3.0.3...v3.0.4) (2021-03-02)
|
|
||||||
|
|
||||||
### [3.0.3](https://github.com/wagoid/commitlint-github-action/compare/v3.0.2...v3.0.3) (2021-03-02)
|
|
||||||
|
|
||||||
### [3.0.2](https://github.com/wagoid/commitlint-github-action/compare/v3.0.1...v3.0.2) (2021-03-02)
|
|
||||||
|
|
||||||
### [3.0.1](https://github.com/wagoid/commitlint-github-action/compare/v3.0.0...v3.0.1) (2021-02-25)
|
|
||||||
|
|
||||||
## [3.0.0](https://github.com/wagoid/commitlint-github-action/compare/v2.2.5...v3.0.0) (2021-02-24)
|
|
||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
|
||||||
|
|
||||||
- **deps:** Remove support for lerna v2 and change the order of the `extends` resolution
|
|
||||||
from right-to-left to left-to-right.
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- **deps:** udpate commitlint monorepo to v12 ([8b0b095](https://github.com/wagoid/commitlint-github-action/commit/8b0b095f5e2c4a8bc5ebc94da6e1a9c0ebc6b862)), closes [#97](https://github.com/wagoid/commitlint-github-action/issues/97)
|
|
||||||
|
|
||||||
### [2.2.5](https://github.com/wagoid/commitlint-github-action/compare/v2.2.4...v2.2.5) (2021-02-18)
|
|
||||||
|
|
||||||
### [2.2.4](https://github.com/wagoid/commitlint-github-action/compare/v2.2.3...v2.2.4) (2021-02-17)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- call getOctokit function instead of removed Github constructor ([84dd768](https://github.com/wagoid/commitlint-github-action/commit/84dd7685c6e51c38415801f8ca57df0578a83059))
|
|
||||||
|
|
||||||
### [2.2.3](https://github.com/wagoid/commitlint-github-action/compare/v2.2.2...v2.2.3) (2021-02-15)
|
|
||||||
|
|
||||||
### [2.2.2](https://github.com/wagoid/commitlint-github-action/compare/v2.2.1...v2.2.2) (2021-02-10)
|
|
||||||
|
|
||||||
### [2.2.1](https://github.com/wagoid/commitlint-github-action/compare/v2.2.0...v2.2.1) (2021-02-10)
|
|
||||||
|
|
||||||
## [2.2.0](https://github.com/wagoid/commitlint-github-action/compare/v2.1.7...v2.2.0) (2021-02-07)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- add outputs generation again ([a34ac47](https://github.com/wagoid/commitlint-github-action/commit/a34ac47c340ba0062e19bae66271eef6390ab03e)), closes [/github.com/actions/toolkit/issues/702#issuecomment-774269650](https://github.com/wagoid//github.com/actions/toolkit/issues/702/issues/issuecomment-774269650)
|
|
||||||
|
|
||||||
### [2.1.7](https://github.com/wagoid/commitlint-github-action/compare/v2.1.6...v2.1.7) (2021-01-28)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- remove output generation ([b674cd3](https://github.com/wagoid/commitlint-github-action/commit/b674cd3ec44b3d627899d44e7cd5c649566d291a))
|
|
||||||
- stop trying to issue commands on failures ([1128358](https://github.com/wagoid/commitlint-github-action/commit/1128358de33626153faadc9d01d0fad8bde5cfb8)), closes [#70](https://github.com/wagoid/commitlint-github-action/issues/70)
|
|
||||||
|
|
||||||
### [2.1.6](https://github.com/wagoid/commitlint-github-action/compare/v2.1.5...v2.1.6) (2020-12-16)
|
|
||||||
|
|
||||||
### [2.1.5](https://github.com/wagoid/commitlint-github-action/compare/v2.1.4...v2.1.5) (2020-12-16)
|
|
||||||
|
|
||||||
### [2.1.4](https://github.com/wagoid/commitlint-github-action/compare/v2.1.3...v2.1.4) (2020-12-03)
|
|
||||||
|
|
||||||
### [2.1.3](https://github.com/wagoid/commitlint-github-action/compare/v2.1.2...v2.1.3) (2020-11-29)
|
|
||||||
|
|
||||||
### [2.1.2](https://github.com/wagoid/commitlint-github-action/compare/v2.1.1...v2.1.2) (2020-11-21)
|
|
||||||
|
|
||||||
### [2.1.1](https://github.com/wagoid/commitlint-github-action/compare/v2.1.0...v2.1.1) (2020-11-11)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- do not run workflow commands in commit messages ([d67c2ec](https://github.com/wagoid/commitlint-github-action/commit/d67c2ec96c0039c3cdbde4e677be13127062ed85))
|
|
||||||
|
|
||||||
## [2.1.0](https://github.com/wagoid/commitlint-github-action/compare/v2.0.5...v2.1.0) (2020-09-14)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- upgrade dependencies to their latest version ([f162ac0](https://github.com/wagoid/commitlint-github-action/commit/f162ac07f904e8b5578fa77172b997145fd61b7a))
|
|
||||||
|
|
||||||
### 2.0.5 (2020-09-14)
|
|
||||||
|
|
||||||
### 2.0.4 (2020-09-14)
|
|
||||||
|
|
||||||
### 2.0.3 (2020-09-14)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- use config-conventional as default config ([7e67891](https://github.com/wagoid/commitlint-github-action/commit/7e678913ff14e04ef128e3d06523eabd0df4d639))
|
|
||||||
|
|
||||||
### 2.0.2 (2020-08-22)
|
|
||||||
|
|
||||||
## [2.0.1](https://github.com/wagoid/commitlint-github-action/compare/v2.0.0...v2.0.1) (2020-08-20)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- action shows error ouput when not all commits have warnings ([0911cae](https://github.com/wagoid/commitlint-github-action/commit/0911cae00990e44bafab30af5357ed057b5cf964)), closes [#43](https://github.com/wagoid/commitlint-github-action/issues/43)
|
|
||||||
|
|
||||||
# [2.0.0](https://github.com/wagoid/commitlint-github-action/compare/v1.8.0...v2.0.0) (2020-08-02)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- upgrade commitlint dependencies to v9 ([a413a3f](https://github.com/wagoid/commitlint-github-action/commit/a413a3f439c38181670fdd6d1be4b528c942af4b))
|
|
||||||
- use action input instead of env var to get the github token ([18e9bff](https://github.com/wagoid/commitlint-github-action/commit/18e9bff0e6956f1bfe76e18cc582c6cb5d3b9800))
|
|
||||||
|
|
||||||
### BREAKING CHANGES
|
### BREAKING CHANGES
|
||||||
|
|
||||||
- GITHUB_TOKEN env var is now ignored. In case a custom token is needed,
|
* chore: rename circleci windows job
|
||||||
|
* requires lerna v5
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.15](https://github.com/wagoid/commitlint-github-action/compare/v4.1.14...v4.1.15) (2022-06-16)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.14](https://github.com/wagoid/commitlint-github-action/compare/v4.1.13...v4.1.14) (2022-06-16)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.13](https://github.com/wagoid/commitlint-github-action/compare/v4.1.12...v4.1.13) (2022-06-16)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.12](https://github.com/wagoid/commitlint-github-action/compare/v4.1.11...v4.1.12) (2022-05-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* set workspace directory as safe in the entrypoint ([ce9a8cb](https://github.com/wagoid/commitlint-github-action/commit/ce9a8cb8ca913ad31123ebcfb3ce88061fe7108e)), closes [/github.com/actions/checkout/issues/760#issuecomment-1098135955](https://github.com//github.com/actions/checkout/issues/760/issues/issuecomment-1098135955)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.11](https://github.com/wagoid/commitlint-github-action/compare/v4.1.10...v4.1.11) (2022-04-06)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.10](https://github.com/wagoid/commitlint-github-action/compare/v4.1.9...v4.1.10) (2022-04-01)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.9](https://github.com/wagoid/commitlint-github-action/compare/v4.1.8...v4.1.9) (2021-10-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* use helpUrl from config when present ([6f0b49b](https://github.com/wagoid/commitlint-github-action/commit/6f0b49bb7b70977c2f0ea471a0282d21d5a8aab5)), closes [#234](https://github.com/wagoid/commitlint-github-action/issues/234)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.8](https://github.com/wagoid/commitlint-github-action/compare/v4.1.7...v4.1.8) (2021-10-11)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.7](https://github.com/wagoid/commitlint-github-action/compare/v4.1.6...v4.1.7) (2021-10-11)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.6](https://github.com/wagoid/commitlint-github-action/compare/v4.1.5...v4.1.6) (2021-10-11)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.5](https://github.com/wagoid/commitlint-github-action/compare/v4.1.4...v4.1.5) (2021-10-01)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.4](https://github.com/wagoid/commitlint-github-action/compare/v4.1.3...v4.1.4) (2021-09-11)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.3](https://github.com/wagoid/commitlint-github-action/compare/v4.1.2...v4.1.3) (2021-09-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* action failing to check footer of a single commit ([961b6d4](https://github.com/wagoid/commitlint-github-action/commit/961b6d4cd7565e86ea5e28bcb015042ae2022f4f)), closes [#187](https://github.com/wagoid/commitlint-github-action/issues/187)
|
||||||
|
* vulnerabilities from npm audit ([bf83d2b](https://github.com/wagoid/commitlint-github-action/commit/bf83d2b35c4177779d047f464b48d9907f2c5201))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.2](https://github.com/wagoid/commitlint-github-action/compare/v4.1.1...v4.1.2) (2021-09-11)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.1.1](https://github.com/wagoid/commitlint-github-action/compare/v4.1.0...v4.1.1) (2021-07-17)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [4.1.0](https://github.com/wagoid/commitlint-github-action/compare/v4.0.3...v4.1.0) (2021-07-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* officially support commitlint-plugin-function-rules ([d6d6fc0](https://github.com/wagoid/commitlint-github-action/commit/d6d6fc0ae0ec45f7b495ae44a78ec5499877ae0d)), closes [#196](https://github.com/wagoid/commitlint-github-action/issues/196)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.0.3](https://github.com/wagoid/commitlint-github-action/compare/v4.0.2...v4.0.3) (2021-07-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* build the action with rollup ([2e57812](https://github.com/wagoid/commitlint-github-action/commit/2e578124a54b446aaf8dfa6d7c71d92e2d6a3de7)), closes [#194](https://github.com/wagoid/commitlint-github-action/issues/194)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.0.2](https://github.com/wagoid/commitlint-github-action/compare/v4.0.1...v4.0.2) (2021-07-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* default to .cjs extension in config files ([5b6cd1b](https://github.com/wagoid/commitlint-github-action/commit/5b6cd1b23af3fcd4e6df552d48cc01dff41262dd))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.0.1](https://github.com/wagoid/commitlint-github-action/compare/v4.0.0...v4.0.1) (2021-07-15)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [4.0.0](https://github.com/wagoid/commitlint-github-action/compare/v3.1.4...v4.0.0) (2021-07-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* update dependencies that needed to switch to ESM syntax ([5463926](https://github.com/wagoid/commitlint-github-action/commit/5463926c07584c419d865a3fc9efdb382be54995))
|
||||||
|
* upgrade to node.js 16 to support ES modules by default ([30d514f](https://github.com/wagoid/commitlint-github-action/commit/30d514f252505053d2e65896a0865ff0302b7233))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* Node.js version used on the action updated from 12 to
|
||||||
|
16
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.1.4](https://github.com/wagoid/commitlint-github-action/compare/v3.1.3...v3.1.4) (2021-05-19)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.1.3](https://github.com/wagoid/commitlint-github-action/compare/v3.1.2...v3.1.3) (2021-05-10)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.1.2](https://github.com/wagoid/commitlint-github-action/compare/v3.1.1...v3.1.2) (2021-05-08)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.1.1](https://github.com/wagoid/commitlint-github-action/compare/v3.1.0...v3.1.1) (2021-05-04)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [3.1.0](https://github.com/wagoid/commitlint-github-action/compare/v3.0.8...v3.1.0) (2021-04-06)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add support for pull_request_target event ([de51303](https://github.com/wagoid/commitlint-github-action/commit/de513030467551ee03fb8827bd790967fd5818ab))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.0.8](https://github.com/wagoid/commitlint-github-action/compare/v3.0.7...v3.0.8) (2021-04-05)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.0.7](https://github.com/wagoid/commitlint-github-action/compare/v3.0.6...v3.0.7) (2021-04-01)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.0.6](https://github.com/wagoid/commitlint-github-action/compare/v3.0.5...v3.0.6) (2021-03-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* perform an atomic push when releasing ([9d00d1e](https://github.com/wagoid/commitlint-github-action/commit/9d00d1e75718143215dbf95c9c12956c56225e90))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.0.5](https://github.com/wagoid/commitlint-github-action/compare/v3.0.3...v3.0.5) (2021-03-02)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.0.3](https://github.com/wagoid/commitlint-github-action/compare/v3.0.2...v3.0.3) (2021-03-02)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.0.2](https://github.com/wagoid/commitlint-github-action/compare/v3.0.1...v3.0.2) (2021-03-02)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.0.1](https://github.com/wagoid/commitlint-github-action/compare/v3.0.0...v3.0.1) (2021-02-25)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [3.0.0](https://github.com/wagoid/commitlint-github-action/compare/v2.2.5...v3.0.0) (2021-02-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **deps:** udpate commitlint monorepo to v12 ([8b0b095](https://github.com/wagoid/commitlint-github-action/commit/8b0b095f5e2c4a8bc5ebc94da6e1a9c0ebc6b862)), closes [#97](https://github.com/wagoid/commitlint-github-action/issues/97)
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* **deps:** Remove support for lerna v2 and change the order of the `extends` resolution
|
||||||
|
from right-to-left to left-to-right.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.2.5](https://github.com/wagoid/commitlint-github-action/compare/v2.2.4...v2.2.5) (2021-02-18)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.2.4](https://github.com/wagoid/commitlint-github-action/compare/v2.2.3...v2.2.4) (2021-02-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* call getOctokit function instead of removed Github constructor ([84dd768](https://github.com/wagoid/commitlint-github-action/commit/84dd7685c6e51c38415801f8ca57df0578a83059))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.2.3](https://github.com/wagoid/commitlint-github-action/compare/v2.2.2...v2.2.3) (2021-02-15)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.2.2](https://github.com/wagoid/commitlint-github-action/compare/v2.2.1...v2.2.2) (2021-02-10)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.2.1](https://github.com/wagoid/commitlint-github-action/compare/v2.2.0...v2.2.1) (2021-02-10)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.2.0](https://github.com/wagoid/commitlint-github-action/compare/v2.1.7...v2.2.0) (2021-02-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add outputs generation again ([a34ac47](https://github.com/wagoid/commitlint-github-action/commit/a34ac47c340ba0062e19bae66271eef6390ab03e)), closes [/github.com/actions/toolkit/issues/702#issuecomment-774269650](https://github.com//github.com/actions/toolkit/issues/702/issues/issuecomment-774269650)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.1.7](https://github.com/wagoid/commitlint-github-action/compare/v2.1.6...v2.1.7) (2021-01-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove output generation ([b674cd3](https://github.com/wagoid/commitlint-github-action/commit/b674cd3ec44b3d627899d44e7cd5c649566d291a))
|
||||||
|
* stop trying to issue commands on failures ([1128358](https://github.com/wagoid/commitlint-github-action/commit/1128358de33626153faadc9d01d0fad8bde5cfb8)), closes [#70](https://github.com/wagoid/commitlint-github-action/issues/70)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.1.6](https://github.com/wagoid/commitlint-github-action/compare/v2.1.5...v2.1.6) (2020-12-16)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.1.5](https://github.com/wagoid/commitlint-github-action/compare/v2.1.4...v2.1.5) (2020-12-16)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.1.4](https://github.com/wagoid/commitlint-github-action/compare/v2.1.3...v2.1.4) (2020-12-03)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.1.3](https://github.com/wagoid/commitlint-github-action/compare/v2.1.2...v2.1.3) (2020-11-29)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.1.2](https://github.com/wagoid/commitlint-github-action/compare/v2.1.1...v2.1.2) (2020-11-21)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.1.1](https://github.com/wagoid/commitlint-github-action/compare/v2.1.0...v2.1.1) (2020-11-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* do not run workflow commands in commit messages ([d67c2ec](https://github.com/wagoid/commitlint-github-action/commit/d67c2ec96c0039c3cdbde4e677be13127062ed85))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.1.0](https://github.com/wagoid/commitlint-github-action/compare/v2.0.5...v2.1.0) (2020-09-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* upgrade dependencies to their latest version ([f162ac0](https://github.com/wagoid/commitlint-github-action/commit/f162ac07f904e8b5578fa77172b997145fd61b7a))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.5](https://github.com/wagoid/commitlint-github-action/compare/v2.0.4...v2.0.5) (2020-09-14)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.4](https://github.com/wagoid/commitlint-github-action/compare/v2.0.3...v2.0.4) (2020-09-14)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.3](https://github.com/wagoid/commitlint-github-action/compare/v2.0.2...v2.0.3) (2020-09-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* use config-conventional as default config ([7e67891](https://github.com/wagoid/commitlint-github-action/commit/7e678913ff14e04ef128e3d06523eabd0df4d639))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.2](https://github.com/wagoid/commitlint-github-action/compare/v2.0.1...v2.0.2) (2020-08-22)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.1](https://github.com/wagoid/commitlint-github-action/compare/v2.0.0...v2.0.1) (2020-08-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* action shows error ouput when not all commits have warnings ([0911cae](https://github.com/wagoid/commitlint-github-action/commit/0911cae00990e44bafab30af5357ed057b5cf964)), closes [#43](https://github.com/wagoid/commitlint-github-action/issues/43)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0](https://github.com/wagoid/commitlint-github-action/compare/v1.8.0...v2.0.0) (2020-08-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* upgrade commitlint dependencies to v9 ([a413a3f](https://github.com/wagoid/commitlint-github-action/commit/a413a3f439c38181670fdd6d1be4b528c942af4b))
|
||||||
|
* use action input instead of env var to get the github token ([18e9bff](https://github.com/wagoid/commitlint-github-action/commit/18e9bff0e6956f1bfe76e18cc582c6cb5d3b9800))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* GITHUB_TOKEN env var is now ignored. In case a custom token is needed,
|
||||||
it'll be necessary to pass it via the `token` input from now on.
|
it'll be necessary to pass it via the `token` input from now on.
|
||||||
- this includes breaking changes from commitlint v9,
|
* this includes breaking changes from commitlint v9,
|
||||||
like the fact that `improvement` type is now rejected in `@commitlint/config-conventional`.
|
like the fact that `improvement` type is now rejected in `@commitlint/config-conventional`.
|
||||||
|
|
||||||
<a name="1.8.0"></a>
|
|
||||||
|
|
||||||
# [1.8.0](https://github.com/wagoid/commitlint-github-action/compare/v1.7.0...v1.8.0) (2020-08-02)
|
# [1.8.0](https://github.com/wagoid/commitlint-github-action/compare/v1.7.0...v1.8.0) (2020-08-02)
|
||||||
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- add `results` output ([550792f](https://github.com/wagoid/commitlint-github-action/commit/550792f)), closes [#39](https://github.com/wagoid/commitlint-github-action/issues/39)
|
* add `results` output ([550792f](https://github.com/wagoid/commitlint-github-action/commit/550792f0ca7bb2cb7e9b15afee32ffead2b237e5)), closes [#39](https://github.com/wagoid/commitlint-github-action/issues/39)
|
||||||
|
|
||||||
|
|
||||||
<a name="1.7.0"></a>
|
|
||||||
|
|
||||||
# [1.7.0](https://github.com/wagoid/commitlint-github-action/compare/v1.6.0...v1.7.0) (2020-07-03)
|
# [1.7.0](https://github.com/wagoid/commitlint-github-action/compare/v1.6.0...v1.7.0) (2020-07-03)
|
||||||
|
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|
||||||
- improve action pull speed by using an alpine image ([d0b8181](https://github.com/wagoid/commitlint-github-action/commit/d0b8181)), closes [#37](https://github.com/wagoid/commitlint-github-action/issues/37)
|
* improve action pull speed by using an alpine image ([d0b8181](https://github.com/wagoid/commitlint-github-action/commit/d0b8181fa4aff97a9369f2df5c1672d4afbc1e0a)), closes [#37](https://github.com/wagoid/commitlint-github-action/issues/37)
|
||||||
|
|
||||||
|
|
||||||
<a name="1.6.0"></a>
|
|
||||||
|
|
||||||
# [1.6.0](https://github.com/wagoid/commitlint-github-action/compare/v1.5.0...v1.6.0) (2020-03-11)
|
# [1.6.0](https://github.com/wagoid/commitlint-github-action/compare/v1.5.0...v1.6.0) (2020-03-11)
|
||||||
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- upgrade to latest commitlint version ([6125fde](https://github.com/wagoid/commitlint-github-action/commit/6125fde))
|
* upgrade to latest commitlint version ([6125fde](https://github.com/wagoid/commitlint-github-action/commit/6125fdec43ef947cadae4e84df097d400089ebbb))
|
||||||
|
|
||||||
|
|
||||||
<a name="1.5.0"></a>
|
|
||||||
|
|
||||||
# [1.5.0](https://github.com/wagoid/commitlint-github-action/compare/v1.4.0...v1.5.0) (2020-02-22)
|
# [1.5.0](https://github.com/wagoid/commitlint-github-action/compare/v1.4.0...v1.5.0) (2020-02-22)
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- add support for additional dependencies ([895d9f3](https://github.com/wagoid/commitlint-github-action/commit/895d9f3)), closes [#27](https://github.com/wagoid/commitlint-github-action/issues/27)
|
|
||||||
|
|
||||||
<a name="1.4.0"></a>
|
|
||||||
|
|
||||||
# [1.4.0](https://github.com/wagoid/commitlint-github-action/compare/v1.3.2...v1.4.0) (2020-02-01)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- don't fail on warnings ([6e0fcb1](https://github.com/wagoid/commitlint-github-action/commit/6e0fcb1))
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- add helpURL parameter ([f4821d1](https://github.com/wagoid/commitlint-github-action/commit/f4821d1))
|
* add support for additional dependencies ([895d9f3](https://github.com/wagoid/commitlint-github-action/commit/895d9f3f73f541076012c5572ffa9249c42aed65)), closes [#27](https://github.com/wagoid/commitlint-github-action/issues/27)
|
||||||
|
|
||||||
<a name="1.3.2"></a>
|
|
||||||
|
|
||||||
## [1.3.2](https://github.com/wagoid/commitlint-github-action/compare/v1.3.1...v1.3.2) (2020-01-05)
|
|
||||||
|
# [1.4.0](https://github.com/wagoid/commitlint-github-action/compare/v1.3.1...v1.4.0) (2020-02-14)
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
- update jira rules ([1be2ce0](https://github.com/wagoid/commitlint-github-action/commit/1be2ce0))
|
* don't fail on warnings ([6e0fcb1](https://github.com/wagoid/commitlint-github-action/commit/6e0fcb1270630772518ceb183d388776739701da))
|
||||||
|
* update jira rules ([1be2ce0](https://github.com/wagoid/commitlint-github-action/commit/1be2ce0d7a4433a2774280459231bd9b2c550e06))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add helpURL parameter ([f4821d1](https://github.com/wagoid/commitlint-github-action/commit/f4821d1c767b560567ce48a8d8d9fbc09af3c49a))
|
||||||
|
|
||||||
|
|
||||||
<a name="1.3.1"></a>
|
|
||||||
|
|
||||||
## [1.3.1](https://github.com/wagoid/commitlint-github-action/compare/v1.3.0...v1.3.1) (2019-11-30)
|
## [1.3.1](https://github.com/wagoid/commitlint-github-action/compare/v1.3.0...v1.3.1) (2019-11-30)
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
- do not try to get parent of push event's "before" field ([c1bba52](https://github.com/wagoid/commitlint-github-action/commit/c1bba52)), closes [#18](https://github.com/wagoid/commitlint-github-action/issues/18)
|
* do not try to get parent of push event's "before" field ([c1bba52](https://github.com/wagoid/commitlint-github-action/commit/c1bba52d77fd4b35d15b07a6bea62c0d471be128)), closes [#18](https://github.com/wagoid/commitlint-github-action/issues/18)
|
||||||
|
|
||||||
|
|
||||||
<a name="1.3.0"></a>
|
|
||||||
|
|
||||||
# [1.3.0](https://github.com/wagoid/commitlint-github-action/compare/v1.2.3...v1.3.0) (2019-11-25)
|
# [1.3.0](https://github.com/wagoid/commitlint-github-action/compare/v1.2.3...v1.3.0) (2019-11-25)
|
||||||
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- support opts for lint ([c1cb555](https://github.com/wagoid/commitlint-github-action/commit/c1cb555))
|
* support opts for lint ([c1cb555](https://github.com/wagoid/commitlint-github-action/commit/c1cb555db50ed712533a81f33e925467d06a2977))
|
||||||
|
|
||||||
|
|
||||||
<a name="1.2.3"></a>
|
|
||||||
|
|
||||||
## [1.2.3](https://github.com/wagoid/commitlint-github-action/compare/v1.2.2...v1.2.3) (2019-11-24)
|
## [1.2.3](https://github.com/wagoid/commitlint-github-action/compare/v1.2.2...v1.2.3) (2019-11-24)
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
- also check range of commits for push events ([aa3e7ae](https://github.com/wagoid/commitlint-github-action/commit/aa3e7ae))
|
* also check range of commits for push events ([aa3e7ae](https://github.com/wagoid/commitlint-github-action/commit/aa3e7ae63ba43b1a9ac061e52296a9c9624a2945))
|
||||||
- errors not showing when PR has only one commit ([8dd0fbf](https://github.com/wagoid/commitlint-github-action/commit/8dd0fbf))
|
* errors not showing when PR has only one commit ([8dd0fbf](https://github.com/wagoid/commitlint-github-action/commit/8dd0fbf821d2787f01a1eb83f410d5179e6e45a5))
|
||||||
- Jira rules can now be used out of the box ([6cede4b](https://github.com/wagoid/commitlint-github-action/commit/6cede4b))
|
* Jira rules can now be used out of the box ([6cede4b](https://github.com/wagoid/commitlint-github-action/commit/6cede4b760624a01ecc0abcdf323ce46ec551256))
|
||||||
|
|
||||||
|
|
||||||
<a name="1.2.2"></a>
|
|
||||||
|
|
||||||
## [1.2.2](https://github.com/wagoid/commitlint-github-action/compare/v1.2.1...v1.2.2) (2019-10-21)
|
## [1.2.2](https://github.com/wagoid/commitlint-github-action/compare/v1.2.1...v1.2.2) (2019-10-21)
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
- set [@commitlint](https://github.com/commitlint)/config-conventional to exact version 8.2.0 ([4fb9495](https://github.com/wagoid/commitlint-github-action/commit/4fb9495))
|
* set @commitlint/config-conventional to exact version 8.2.0 ([4fb9495](https://github.com/wagoid/commitlint-github-action/commit/4fb94958d723dce739c60b3e6d13ff4aebd7b8bb))
|
||||||
- update [@commitlint](https://github.com/commitlint)/config-conventional to latest version ([bc31cec](https://github.com/wagoid/commitlint-github-action/commit/bc31cec))
|
* update @commitlint/config-conventional to latest version ([bc31cec](https://github.com/wagoid/commitlint-github-action/commit/bc31cecbe8f41a27fbefe78744e0954d38d4d4d3))
|
||||||
|
|
||||||
|
|
||||||
<a name="1.2.1"></a>
|
|
||||||
|
|
||||||
## [1.2.1](https://github.com/wagoid/commitlint-github-action/compare/v1.2.0...v1.2.1) (2019-10-18)
|
## [1.2.1](https://github.com/wagoid/commitlint-github-action/compare/v1.2.0...v1.2.1) (2019-10-18)
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- also show stack when an error happens ([2c42093](https://github.com/wagoid/commitlint-github-action/commit/2c42093))
|
|
||||||
- lerna scopes not working due to missing lerna dependency ([99b068a](https://github.com/wagoid/commitlint-github-action/commit/99b068a))
|
|
||||||
|
|
||||||
<a name="1.2.0"></a>
|
|
||||||
|
|
||||||
## [1.2.1](https://github.com/wagoid/commitlint-github-action/compare/v1.1.1...v1.2.0) (2019-10-15)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- add ability to run commitlint on events that are not pull requests ([23cd801](https://github.com/wagoid/commitlint-github-action/commit/23cd801))
|
|
||||||
- add firstParent input to ignore errors from your default branch ([598e473](https://github.com/wagoid/commitlint-github-action/commit/598e473))
|
|
||||||
|
|
||||||
<a name="1.1.1"></a>
|
|
||||||
|
|
||||||
## [1.1.1](https://github.com/wagoid/commitlint-github-action/compare/v1.1.0...v1.1.1) (2019-10-08)
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
- do not call `require` in the config file to allow other file types ([949b695](https://github.com/wagoid/commitlint-github-action/commit/949b695))
|
* also show stack when an error happens ([2c42093](https://github.com/wagoid/commitlint-github-action/commit/2c42093c709a9ccfef8e76a53d64595331627893))
|
||||||
|
* do not call `require` in the config file to allow other file types ([3559d7d](https://github.com/wagoid/commitlint-github-action/commit/3559d7d304b40cda20e697472e6d501f584d96f1))
|
||||||
|
* lerna scopes not working due to missing lerna dependency ([99b068a](https://github.com/wagoid/commitlint-github-action/commit/99b068a8442549908268790b6fdb6ceda74aee1f))
|
||||||
|
* make action name unique ([fd906ae](https://github.com/wagoid/commitlint-github-action/commit/fd906aec0b42b81b00ab19c1432598fb10551838))
|
||||||
|
* revert action to use debian image ([33f8aa3](https://github.com/wagoid/commitlint-github-action/commit/33f8aa30dd74d746436537fa50b0073a575aa53e))
|
||||||
|
* use Commit Linter as a unique action name ([dedf966](https://github.com/wagoid/commitlint-github-action/commit/dedf966fb08cdce72293ff259f57e0096a4c9f64))
|
||||||
|
|
||||||
<a name="1.1.0"></a>
|
|
||||||
|
|
||||||
# [1.1.0](https://github.com/wagoid/commitlint-github-action/compare/v1.0.0...v1.1.0) (2019-10-04)
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- use image from docker hub ([9379b32](https://github.com/wagoid/commitlint-github-action/commit/9379b32))
|
* add ability to run commitlint on events that are not pull requests ([23cd801](https://github.com/wagoid/commitlint-github-action/commit/23cd801837313785b2231d6d73e294bd6edf0feb))
|
||||||
|
* add commitlint action ([478fbaf](https://github.com/wagoid/commitlint-github-action/commit/478fbaff69771fd49568dabcefde8dd86543c1fe))
|
||||||
<a name="1.0.0"></a>
|
* add firstParent input to ignore errors from your default branch ([598e473](https://github.com/wagoid/commitlint-github-action/commit/598e473cb441db3b8a81761f2d77f6182ce73993))
|
||||||
|
* use image from docker hub ([9379b32](https://github.com/wagoid/commitlint-github-action/commit/9379b32eb6e98429a7b2d25d47864e730d10bdc7))
|
||||||
# 1.0.0 (2019-10-02)
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
- make action name unique ([fd906ae](https://github.com/wagoid/commitlint-github-action/commit/fd906ae))
|
|
||||||
- revert action to use debian image ([33f8aa3](https://github.com/wagoid/commitlint-github-action/commit/33f8aa3))
|
|
||||||
- use Commit Linter as a unique action name ([dedf966](https://github.com/wagoid/commitlint-github-action/commit/dedf966))
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
- add commitlint action ([478fbaf](https://github.com/wagoid/commitlint-github-action/commit/478fbaf))
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
FROM node:16.15.1-alpine3.14 as build
|
FROM node:20.9.0-alpine3.17 as build
|
||||||
|
|
||||||
COPY package*.json /
|
COPY package*.json /
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@ FROM node:20.9.0-alpine3.17
|
||||||
|
|
||||||
RUN apk --no-cache add git
|
RUN apk --no-cache add git
|
||||||
|
|
||||||
COPY --from=build dist/run.js /run.js
|
COPY --from=build dist/run.mjs /run.mjs
|
||||||
|
|
||||||
COPY package*.json /
|
COPY package*.json /
|
||||||
|
|
||||||
|
|
|
||||||
10
README.md
10
README.md
|
|
@ -19,25 +19,27 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: wagoid/commitlint-github-action@v5
|
- uses: wagoid/commitlint-github-action@v6
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, you can run on other event types such as `on: [push]`. In that case the action will lint the push event's commit(s) instead of linting commits from a pull request. You can also combine `push` and `pull_request` together in the same workflow.
|
Alternatively, you can run on other event types such as `on: [push]`. In that case the action will lint the push event's commit(s) instead of linting commits from a pull request. You can also combine `push` and `pull_request` together in the same workflow.
|
||||||
|
|
||||||
## Inputs
|
## Inputs
|
||||||
|
|
||||||
You can supply these inputs to the `wagoid/commitlint-github-action@v5` step.
|
You can supply these inputs to the `wagoid/commitlint-github-action@v6` step.
|
||||||
|
|
||||||
### `configFile`
|
### `configFile`
|
||||||
|
|
||||||
The path to your commitlint config file.
|
The path to your commitlint config file.
|
||||||
|
|
||||||
Default: `commitlint.config.js`
|
Default: `commitlint.config.mjs`
|
||||||
|
|
||||||
If the config file doesn't exist, [config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) settings will be loaded as a default fallback.
|
If the config file doesn't exist, [config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) settings will be loaded as a default fallback.
|
||||||
|
|
||||||
Details on the configuration file can be found on [the commitlint website](https://commitlint.js.org/#/reference-configuration).
|
Details on the configuration file can be found on [the commitlint website](https://commitlint.js.org/#/reference-configuration).
|
||||||
|
|
||||||
|
Note: `commitlint.config.js` doesn't work with this action. If you use a JS config file, it's required to be an ES Module (`.mjs` extension)
|
||||||
|
|
||||||
### `failOnWarnings`
|
### `failOnWarnings`
|
||||||
|
|
||||||
Whether you want to fail on warnings or not.
|
Whether you want to fail on warnings or not.
|
||||||
|
|
@ -149,7 +151,7 @@ jobs:
|
||||||
- run: npm install
|
- run: npm install
|
||||||
# Run the commitlint action, considering its own dependencies and yours as well 🚀
|
# Run the commitlint action, considering its own dependencies and yours as well 🚀
|
||||||
# `github.workspace` is the path to your repository.
|
# `github.workspace` is the path to your repository.
|
||||||
- uses: wagoid/commitlint-github-action@v5
|
- uses: wagoid/commitlint-github-action@v6
|
||||||
env:
|
env:
|
||||||
NODE_PATH: ${{ github.workspace }}/node_modules
|
NODE_PATH: ${{ github.workspace }}/node_modules
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ inputs:
|
||||||
configFile:
|
configFile:
|
||||||
description: Commitlint config file. If the file doesn't exist, config-conventional settings will be
|
description: Commitlint config file. If the file doesn't exist, config-conventional settings will be
|
||||||
loaded as a fallback.
|
loaded as a fallback.
|
||||||
default: ./commitlint.config.js
|
default: ./commitlint.config.mjs
|
||||||
required: false
|
required: false
|
||||||
failOnWarnings:
|
failOnWarnings:
|
||||||
description: Whether you want to fail on warnings or not
|
description: Whether you want to fail on warnings or not
|
||||||
|
|
@ -25,9 +25,8 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
token:
|
token:
|
||||||
description: >
|
description: >
|
||||||
Personal access token (PAT) used to interact with the GitHub API. By default, the
|
Personal access token (PAT) used to interact with the GitHub API. By default, the automatic
|
||||||
automatic token provided by GitHub is used. You can see more info about GitHub's default token
|
token provided by GitHub is used. You can see more info about GitHub's default token here:
|
||||||
here:
|
|
||||||
https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
|
https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
|
||||||
default: ${{ github.token }}
|
default: ${{ github.token }}
|
||||||
required: false
|
required: false
|
||||||
|
|
@ -36,7 +35,7 @@ outputs:
|
||||||
description: The error and warning messages for each one of the analyzed commits
|
description: The error and warning messages for each one of the analyzed commits
|
||||||
runs:
|
runs:
|
||||||
using: docker
|
using: docker
|
||||||
image: docker://wagoid/commitlint-github-action:5.4.5
|
image: docker://wagoid/commitlint-github-action:6.0.1
|
||||||
branding:
|
branding:
|
||||||
icon: check-square
|
icon: check-square
|
||||||
color: blue
|
color: blue
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable import/no-extraneous-dependencies */
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
const { maxLineLength } = require('@commitlint/ensure')
|
import { maxLineLength } from '@commitlint/ensure'
|
||||||
|
|
||||||
const bodyMaxLineLength = 100
|
const bodyMaxLineLength = 100
|
||||||
|
|
||||||
|
|
@ -14,7 +14,7 @@ const validateBodyMaxLengthIgnoringDeps = (parsedCommit) => {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
export default {
|
||||||
extends: ['@commitlint/config-conventional'],
|
extends: ['@commitlint/config-conventional'],
|
||||||
plugins: ['commitlint-plugin-function-rules'],
|
plugins: ['commitlint-plugin-function-rules'],
|
||||||
rules: {
|
rules: {
|
||||||
|
|
@ -5,11 +5,13 @@ set -e
|
||||||
if [ -z "$NODE_PATH" ]; then
|
if [ -z "$NODE_PATH" ]; then
|
||||||
export NODE_PATH=/node_modules
|
export NODE_PATH=/node_modules
|
||||||
else
|
else
|
||||||
export NODE_PATH=$NODE_PATH:/node_modules
|
export NODE_PATH="$NODE_PATH":/node_modules
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Since actions/checkout can be setup with a different user ID, we need to set the workspace as safe inside this action
|
# Since actions/checkout can be setup with a different user ID, we need to set the workspace as safe inside this action
|
||||||
# Info about the vunlerability: https://github.blog/2022-04-12-git-security-vulnerability-announced/
|
# Info about the vunlerability: https://github.blog/2022-04-12-git-security-vulnerability-announced/
|
||||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
|
|
||||||
node /run.js
|
export NODE_OPTIONS="$NODE_OPTIONS --experimental-vm-modules"
|
||||||
|
|
||||||
|
node /run.mjs
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
module.exports = {
|
export default {
|
||||||
extends: ['@commitlint/config-conventional'],
|
extends: ['@commitlint/config-conventional'],
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports = {
|
export default {
|
||||||
extends: ['@commitlint/config-conventional'],
|
extends: ['@commitlint/config-conventional'],
|
||||||
helpUrl: 'https://example.org',
|
helpUrl: 'https://example.org',
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports = {
|
export default {
|
||||||
plugins: ['commitlint-plugin-jira-rules'],
|
plugins: ['commitlint-plugin-jira-rules'],
|
||||||
extends: ['jira'],
|
extends: ['jira'],
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports = {
|
export default {
|
||||||
extends: ['@commitlint/config-conventional'],
|
extends: ['@commitlint/config-conventional'],
|
||||||
rules: {
|
rules: {
|
||||||
'signed-off-by': [2, 'always', 'Signed-off-by:'],
|
'signed-off-by': [2, 'always', 'Signed-off-by:'],
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
module.exports = {
|
export default {
|
||||||
// Automatically clear mock calls and instances between every test
|
// Automatically clear mock calls and instances between every test
|
||||||
// preset: 'rollup-jest',
|
|
||||||
clearMocks: true,
|
clearMocks: true,
|
||||||
testEnvironment: '@commitlint/test-environment',
|
testEnvironment: '@commitlint/test-environment',
|
||||||
|
testMatch: [
|
||||||
|
'**/__tests__/**/*.?(m)[jt]s?(x)',
|
||||||
|
'**/?(*.)+(spec|test).?(m)[tj]s?(x)',
|
||||||
|
],
|
||||||
transform: {
|
transform: {
|
||||||
'\\.[jt]sx?$': 'babel-jest',
|
'\\.[jt]sx?$': 'babel-jest',
|
||||||
},
|
},
|
||||||
transformIgnorePatterns: ['node_modules/(?!dargs)'],
|
|
||||||
}
|
}
|
||||||
15766
package-lock.json
generated
15766
package-lock.json
generated
File diff suppressed because it is too large
Load diff
49
package.json
49
package.json
|
|
@ -1,18 +1,18 @@
|
||||||
{
|
{
|
||||||
"name": "commitlint-github-action",
|
"name": "commitlint-github-action",
|
||||||
"version": "5.4.5",
|
"version": "6.0.1",
|
||||||
"description": "commitlint github action",
|
"description": "commitlint github action",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "./dist/run.js",
|
"module": "./dist/run.mjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "husky install",
|
"postinstall": "husky install",
|
||||||
"test": "NODE_PATH=./node_modules jest",
|
"test": "NODE_PATH=./node_modules NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest",
|
||||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"build": "rollup -c"
|
"build": "rollup -c"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.20.2"
|
"node": "20.9.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
@ -24,16 +24,16 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
"@actions/github": "^6.0.0",
|
"@actions/github": "^6.0.0",
|
||||||
"@commitlint/config-angular": "^18.1.0",
|
"@commitlint/config-angular": "^19.1.0",
|
||||||
"@commitlint/config-conventional": "^18.1.0",
|
"@commitlint/config-conventional": "^19.1.0",
|
||||||
"@commitlint/config-lerna-scopes": "^18.1.0",
|
"@commitlint/config-lerna-scopes": "^19.0.0",
|
||||||
"@commitlint/config-patternplate": "^18.1.0",
|
"@commitlint/config-patternplate": "^19.1.0",
|
||||||
"@commitlint/ensure": "^18.1.0",
|
"@commitlint/ensure": "^19.0.3",
|
||||||
"@commitlint/format": "^18.1.0",
|
"@commitlint/format": "^19.0.3",
|
||||||
"@commitlint/lint": "^18.1.0",
|
"@commitlint/lint": "^19.1.0",
|
||||||
"@commitlint/load": "^18.2.0",
|
"@commitlint/load": "^19.2.0",
|
||||||
"commitlint-config-jira": "^1.6.4",
|
"commitlint-config-jira": "^1.6.4",
|
||||||
"commitlint-plugin-function-rules": "^2.0.2",
|
"commitlint-plugin-function-rules": "^4.0.0",
|
||||||
"commitlint-plugin-jira-rules": "^1.6.4",
|
"commitlint-plugin-jira-rules": "^1.6.4",
|
||||||
"conventional-changelog-conventionalcommits": "^7.0.2",
|
"conventional-changelog-conventionalcommits": "^7.0.2",
|
||||||
"conventional-changelog-lint-config-canonical": "^1.0.0",
|
"conventional-changelog-lint-config-canonical": "^1.0.0",
|
||||||
|
|
@ -43,32 +43,29 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.24.4",
|
"@babel/core": "^7.24.4",
|
||||||
"@babel/preset-env": "^7.24.4",
|
"@babel/preset-env": "^7.24.4",
|
||||||
"@commitlint/cli": "^18.2.0",
|
"@commitlint/cli": "^19.2.1",
|
||||||
"@commitlint/test": "^9.0.1",
|
"@commitlint/test": "^9.0.1",
|
||||||
"@commitlint/test-environment": "^9.0.1",
|
"@commitlint/test-environment": "^9.0.1",
|
||||||
"@jest/globals": "^29.7.0",
|
"@jest/globals": "^29.7.0",
|
||||||
"@rollup/plugin-babel": "^6.0.4",
|
"@rollup/plugin-babel": "^5.3.1",
|
||||||
"@rollup/plugin-commonjs": "^25.0.7",
|
"@rollup/plugin-commonjs": "^22.0.2",
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^14.1.0",
|
||||||
"babel-jest": "^29.7.0",
|
"babel-jest": "^29.7.0",
|
||||||
"commit-and-tag-version": "^12.2.0",
|
"commit-and-tag-version": "^12.2.0",
|
||||||
"conventional-changelog-cli": "^4.1.0",
|
"conventional-changelog-cli": "^4.1.0",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-airbnb-base": "^15.0.0",
|
"eslint-config-airbnb-base": "^15.0.0",
|
||||||
"eslint-config-node": "^4.1.0",
|
"eslint-config-node": "^4.1.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-import": "^2.29.1",
|
"eslint-plugin-import": "^2.29.1",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-prettier": "^5.1.3",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"husky": "^9.0.11",
|
"husky": "^8.0.3",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"lint-staged": "^15.2.2",
|
"lint-staged": "^13.1.1",
|
||||||
"prettier": "^3.2.5",
|
"prettier": "^2.8.4",
|
||||||
"rollup": "^2.79.1",
|
"rollup": "^2.79.1",
|
||||||
"testdouble": "^3.20.2",
|
"testdouble": "^3.20.2",
|
||||||
"yaml": "^2.1.3"
|
"yaml": "^2.4.1"
|
||||||
},
|
|
||||||
"overrides": {
|
|
||||||
"@commitlint/lint": "^18.1.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ import { babel } from '@rollup/plugin-babel'
|
||||||
import pkg from './package.json'
|
import pkg from './package.json'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
input: 'run.js',
|
input: 'run.mjs',
|
||||||
external: (depName) =>
|
external: (depName) =>
|
||||||
depName.includes('node_modules') && !depName.includes('node_modules/dargs'),
|
depName.includes('node_modules') && !depName.includes('node_modules/dargs'),
|
||||||
output: [{ file: pkg.main, format: 'cjs' }],
|
output: [{ file: pkg.module, format: 'es' }],
|
||||||
plugins: [
|
plugins: [
|
||||||
babel({
|
babel({
|
||||||
babelHelpers: 'bundled',
|
babelHelpers: 'bundled',
|
||||||
|
|
|
||||||
3
run.js
3
run.js
|
|
@ -1,3 +0,0 @@
|
||||||
import action from './src/action'
|
|
||||||
|
|
||||||
action()
|
|
||||||
3
run.mjs
Normal file
3
run.mjs
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
import action from './src/action.mjs'
|
||||||
|
|
||||||
|
action()
|
||||||
|
|
@ -5,7 +5,7 @@ import { context as eventContext, getOctokit } from '@actions/github'
|
||||||
import lint from '@commitlint/lint'
|
import lint from '@commitlint/lint'
|
||||||
import { format } from '@commitlint/format'
|
import { format } from '@commitlint/format'
|
||||||
import load from '@commitlint/load'
|
import load from '@commitlint/load'
|
||||||
import generateOutputs from './generateOutputs'
|
import generateOutputs from './generateOutputs.mjs'
|
||||||
|
|
||||||
const pullRequestEvent = 'pull_request'
|
const pullRequestEvent = 'pull_request'
|
||||||
const pullRequestTargetEvent = 'pull_request_target'
|
const pullRequestTargetEvent = 'pull_request_target'
|
||||||
|
|
@ -102,6 +102,13 @@ const showLintResults = async (eventCommits) => {
|
||||||
if (commitDepth) {
|
if (commitDepth) {
|
||||||
commits = commits?.slice(0, commitDepth)
|
commits = commits?.slice(0, commitDepth)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (configPath?.endsWith('.js')) {
|
||||||
|
throw new Error(
|
||||||
|
'.js extension is not allowed for the `configFile`, please use .mjs instead',
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
const config = existsSync(configPath)
|
const config = existsSync(configPath)
|
||||||
? await load({}, { file: configPath })
|
? await load({}, { file: configPath })
|
||||||
: await load({ extends: ['@commitlint/config-conventional'] })
|
: await load({ extends: ['@commitlint/config-conventional'] })
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
/* eslint-env jest */
|
/* eslint-env jest */
|
||||||
import { git } from '@commitlint/test'
|
import { git } from '@commitlint/test'
|
||||||
import { describe } from '@jest/globals'
|
import { jest, describe, it } from '@jest/globals'
|
||||||
import td from 'testdouble'
|
import * as td from 'testdouble'
|
||||||
import {
|
import {
|
||||||
updatePushEnvVars,
|
updatePushEnvVars,
|
||||||
createPushEventPayload,
|
createPushEventPayload,
|
||||||
createPullRequestEventPayload,
|
createPullRequestEventPayload,
|
||||||
updatePullRequestEnvVars,
|
updatePullRequestEnvVars,
|
||||||
buildResponseCommit,
|
buildResponseCommit,
|
||||||
} from './testUtils'
|
} from './testUtils.mjs'
|
||||||
|
|
||||||
const resultsOutputId = 'results'
|
const resultsOutputId = 'results'
|
||||||
|
|
||||||
|
|
@ -18,39 +19,44 @@ const {
|
||||||
|
|
||||||
const initialEnv = { ...process.env }
|
const initialEnv = { ...process.env }
|
||||||
|
|
||||||
const listCommits = td.func('listCommits')
|
const mockListCommits = td.func('listCommits')
|
||||||
|
|
||||||
const runAction = async () => {
|
const mockCore = td.object(['getInput', 'setFailed', 'setOutput'])
|
||||||
const github = await import('@actions/github')
|
|
||||||
|
jest.unstable_mockModule('@actions/core', () => mockCore)
|
||||||
|
|
||||||
|
jest.unstable_mockModule('@actions/github', () => {
|
||||||
class MockOctokit {
|
class MockOctokit {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.rest = {
|
this.rest = {
|
||||||
pulls: {
|
pulls: {
|
||||||
listCommits,
|
listCommits: mockListCommits,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
td.replace(github, 'getOctokit', () => new MockOctokit())
|
return {
|
||||||
|
...jest.requireActual('@actions/github'),
|
||||||
|
getOctokit: () => new MockOctokit(),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const action = (await import('./action')).default
|
const runAction = async () => {
|
||||||
|
const action = (await import('./action.mjs')).default
|
||||||
|
|
||||||
return action()
|
return action()
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('Commit Linter action', () => {
|
describe('Commit Linter action', () => {
|
||||||
let core
|
|
||||||
let cwd
|
let cwd
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
core = await import('@actions/core')
|
td.when(mockCore.getInput('configFile')).thenReturn(
|
||||||
td.replace(core, 'getInput')
|
'./commitlint.config.mjs',
|
||||||
td.replace(core, 'setFailed')
|
)
|
||||||
td.replace(core, 'setOutput')
|
td.when(mockCore.getInput('failOnWarnings')).thenReturn('false')
|
||||||
td.when(core.getInput('configFile')).thenReturn('./commitlint.config.js')
|
td.when(mockCore.getInput('helpURL')).thenReturn(
|
||||||
td.when(core.getInput('failOnWarnings')).thenReturn('false')
|
|
||||||
td.when(core.getInput('helpURL')).thenReturn(
|
|
||||||
'https://github.com/conventional-changelog/commitlint/#what-is-commitlint',
|
'https://github.com/conventional-changelog/commitlint/#what-is-commitlint',
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
@ -62,8 +68,10 @@ describe('Commit Linter action', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should use default config when config file does not exist', async () => {
|
it('should use default config when config file does not exist', async () => {
|
||||||
td.when(core.getInput('configFile')).thenReturn('./not-existing-config.js')
|
td.when(mockCore.getInput('configFile')).thenReturn(
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
'./not-existing-config.mjs',
|
||||||
|
)
|
||||||
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [
|
commits: [
|
||||||
{
|
{
|
||||||
|
|
@ -77,9 +85,11 @@ describe('Commit Linter action', () => {
|
||||||
|
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(contains('You have commit messages with errors')))
|
|
||||||
td.verify(
|
td.verify(
|
||||||
core.setFailed(
|
mockCore.setFailed(contains('You have commit messages with errors')),
|
||||||
|
)
|
||||||
|
td.verify(
|
||||||
|
mockCore.setFailed(
|
||||||
contains(
|
contains(
|
||||||
'https://github.com/conventional-changelog/commitlint/#what-is-commitlint',
|
'https://github.com/conventional-changelog/commitlint/#what-is-commitlint',
|
||||||
),
|
),
|
||||||
|
|
@ -87,8 +97,11 @@ describe('Commit Linter action', () => {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should fail for single push with incorrect message', async () => {
|
it('should fail when using js extension', async () => {
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
td.when(mockCore.getInput('configFile')).thenReturn(
|
||||||
|
'./commitlint.config.js',
|
||||||
|
)
|
||||||
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [
|
commits: [
|
||||||
{
|
{
|
||||||
|
|
@ -102,11 +115,31 @@ describe('Commit Linter action', () => {
|
||||||
|
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(contains('You have commit messages with errors')))
|
td.verify(mockCore.setFailed(contains('.js extension is not allowed')))
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should fail for single push with incorrect message', async () => {
|
||||||
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
|
await createPushEventPayload(cwd, {
|
||||||
|
commits: [
|
||||||
|
{
|
||||||
|
id: 'wrong-message',
|
||||||
|
message: 'wrong message',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
updatePushEnvVars(cwd)
|
||||||
|
td.replace(process, 'cwd', () => cwd)
|
||||||
|
|
||||||
|
await runAction()
|
||||||
|
|
||||||
|
td.verify(
|
||||||
|
mockCore.setFailed(contains('You have commit messages with errors')),
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should fail for push range with wrong messages', async () => {
|
it('should fail for push range with wrong messages', async () => {
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [
|
commits: [
|
||||||
{
|
{
|
||||||
|
|
@ -123,13 +156,13 @@ describe('Commit Linter action', () => {
|
||||||
td.replace(process, 'cwd', () => cwd)
|
td.replace(process, 'cwd', () => cwd)
|
||||||
|
|
||||||
await runAction()
|
await runAction()
|
||||||
td.verify(core.setFailed(contains('wrong message 1')))
|
td.verify(mockCore.setFailed(contains('wrong message 1')))
|
||||||
td.verify(core.setFailed(contains('wrong message 2')))
|
td.verify(mockCore.setFailed(contains('wrong message 2')))
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should pass for push range with wrong messages with failOnErrors set to false', async () => {
|
it('should pass for push range with wrong messages with failOnErrors set to false', async () => {
|
||||||
td.when(core.getInput('failOnErrors')).thenReturn('false')
|
td.when(mockCore.getInput('failOnErrors')).thenReturn('false')
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [
|
commits: [
|
||||||
{
|
{
|
||||||
|
|
@ -148,15 +181,15 @@ describe('Commit Linter action', () => {
|
||||||
|
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true })
|
td.verify(mockCore.setFailed(), { times: 0, ignoreExtraArgs: true })
|
||||||
td.verify(console.log(contains('wrong message 1')))
|
td.verify(console.log(contains('wrong message 1')))
|
||||||
td.verify(console.log(contains('wrong message 2')))
|
td.verify(console.log(contains('wrong message 2')))
|
||||||
td.verify(console.log(contains('Passing despite errors ✅')))
|
td.verify(console.log(contains('Passing despite errors ✅')))
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should pass for push range with correct messages with failOnErrors set to false', async () => {
|
it('should pass for push range with correct messages with failOnErrors set to false', async () => {
|
||||||
td.when(core.getInput('failOnErrors')).thenReturn('false')
|
td.when(mockCore.getInput('failOnErrors')).thenReturn('false')
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [
|
commits: [
|
||||||
{
|
{
|
||||||
|
|
@ -175,12 +208,12 @@ describe('Commit Linter action', () => {
|
||||||
|
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true })
|
td.verify(mockCore.setFailed(), { times: 0, ignoreExtraArgs: true })
|
||||||
td.verify(console.log('Lint free! 🎉'))
|
td.verify(console.log('Lint free! 🎉'))
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should pass for push range with correct messages', async () => {
|
it('should pass for push range with correct messages', async () => {
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [
|
commits: [
|
||||||
{
|
{
|
||||||
|
|
@ -199,13 +232,15 @@ describe('Commit Linter action', () => {
|
||||||
|
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true })
|
td.verify(mockCore.setFailed(), { times: 0, ignoreExtraArgs: true })
|
||||||
td.verify(console.log('Lint free! 🎉'))
|
td.verify(console.log('Lint free! 🎉'))
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should fail for commit with scope that is not a lerna package', async () => {
|
it('should fail for commit with scope that is not a lerna package', async () => {
|
||||||
cwd = await git.bootstrap('fixtures/lerna-scopes')
|
cwd = await git.bootstrap('fixtures/lerna-scopes', process.cwd())
|
||||||
td.when(core.getInput('configFile')).thenReturn('./commitlint.config.yml')
|
td.when(mockCore.getInput('configFile')).thenReturn(
|
||||||
|
'./commitlint.config.yml',
|
||||||
|
)
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [
|
commits: [
|
||||||
{
|
{
|
||||||
|
|
@ -219,13 +254,15 @@ describe('Commit Linter action', () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(
|
td.verify(
|
||||||
core.setFailed(contains('chore(wrong): not including package scope')),
|
mockCore.setFailed(contains('chore(wrong): not including package scope')),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should pass for scope that is a lerna package', async () => {
|
it('should pass for scope that is a lerna package', async () => {
|
||||||
cwd = await git.bootstrap('fixtures/lerna-scopes')
|
cwd = await git.bootstrap('fixtures/lerna-scopes', process.cwd())
|
||||||
td.when(core.getInput('configFile')).thenReturn('./commitlint.config.yml')
|
td.when(mockCore.getInput('configFile')).thenReturn(
|
||||||
|
'./commitlint.config.yml',
|
||||||
|
)
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [
|
commits: [
|
||||||
{
|
{
|
||||||
|
|
@ -244,8 +281,10 @@ describe('Commit Linter action', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should fail for commit that doesn't comply with jira rules", async () => {
|
it("should fail for commit that doesn't comply with jira rules", async () => {
|
||||||
cwd = await git.bootstrap('fixtures/jira')
|
cwd = await git.bootstrap('fixtures/jira', process.cwd())
|
||||||
td.when(core.getInput('configFile')).thenReturn('./commitlint.config.js')
|
td.when(mockCore.getInput('configFile')).thenReturn(
|
||||||
|
'./commitlint.config.mjs',
|
||||||
|
)
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [
|
commits: [
|
||||||
{
|
{
|
||||||
|
|
@ -260,30 +299,32 @@ describe('Commit Linter action', () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(
|
td.verify(
|
||||||
core.setFailed(contains('ib-21212121212121: without jira ticket')),
|
mockCore.setFailed(contains('ib-21212121212121: without jira ticket')),
|
||||||
)
|
)
|
||||||
td.verify(
|
td.verify(
|
||||||
core.setFailed(
|
mockCore.setFailed(
|
||||||
contains(
|
contains(
|
||||||
'ib-21212121212121 taskId must not be longer than 9 characters',
|
'ib-21212121212121 taskId must not be longer than 9 characters',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
td.verify(
|
td.verify(
|
||||||
core.setFailed(
|
mockCore.setFailed(
|
||||||
contains('ib-21212121212121 taskId must be uppercase case'),
|
contains('ib-21212121212121 taskId must be uppercase case'),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
td.verify(
|
td.verify(
|
||||||
core.setFailed(
|
mockCore.setFailed(
|
||||||
contains('ib-21212121212121 commitStatus must be uppercase case'),
|
contains('ib-21212121212121 commitStatus must be uppercase case'),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should pass when commits are not available', async () => {
|
it('should pass when commits are not available', async () => {
|
||||||
td.when(core.getInput('configFile')).thenReturn('./commitlint.config.js')
|
td.when(mockCore.getInput('configFile')).thenReturn(
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
'./commitlint.config.mjs',
|
||||||
|
)
|
||||||
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
await createPushEventPayload(cwd, {})
|
await createPushEventPayload(cwd, {})
|
||||||
updatePushEnvVars(cwd)
|
updatePushEnvVars(cwd)
|
||||||
td.replace(process, 'cwd', () => cwd)
|
td.replace(process, 'cwd', () => cwd)
|
||||||
|
|
@ -291,7 +332,7 @@ describe('Commit Linter action', () => {
|
||||||
|
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true })
|
td.verify(mockCore.setFailed(), { times: 0, ignoreExtraArgs: true })
|
||||||
td.verify(console.log('Lint free! 🎉'))
|
td.verify(console.log('Lint free! 🎉'))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -306,14 +347,14 @@ describe('Commit Linter action', () => {
|
||||||
)
|
)
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
td.when(core.getInput('configFile')).thenReturn(
|
td.when(mockCore.getInput('configFile')).thenReturn(
|
||||||
'./commitlint.config.js',
|
'./commitlint.config.mjs',
|
||||||
)
|
)
|
||||||
await createPullRequestEventPayload(cwd)
|
await createPullRequestEventPayload(cwd)
|
||||||
updatePullRequestEnvVars(cwd, { eventName })
|
updatePullRequestEnvVars(cwd, { eventName })
|
||||||
td.when(
|
td.when(
|
||||||
listCommits({
|
mockListCommits({
|
||||||
owner: 'wagoid',
|
owner: 'wagoid',
|
||||||
repo: 'commitlint-github-action',
|
repo: 'commitlint-github-action',
|
||||||
pull_number: '1',
|
pull_number: '1',
|
||||||
|
|
@ -345,7 +386,7 @@ describe('Commit Linter action', () => {
|
||||||
it('should NOT show errors for a message from before the push', async () => {
|
it('should NOT show errors for a message from before the push', async () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(contains('message from before push')), {
|
td.verify(mockCore.setFailed(contains('message from before push')), {
|
||||||
times: 0,
|
times: 0,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -353,31 +394,33 @@ describe('Commit Linter action', () => {
|
||||||
it('should show errors for the first wrong message', async () => {
|
it('should show errors for the first wrong message', async () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(contains(firstCommit.commit.message)))
|
td.verify(mockCore.setFailed(contains(firstCommit.commit.message)))
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should show errors for the second wrong message', async () => {
|
it('should show errors for the second wrong message', async () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(contains(secondCommit.commit.message)))
|
td.verify(mockCore.setFailed(contains(secondCommit.commit.message)))
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should generate a JSON output of the errors', async () => {
|
it('should generate a JSON output of the errors', async () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setOutput(resultsOutputId, expectedResultsOutput))
|
td.verify(mockCore.setOutput(resultsOutputId, expectedResultsOutput))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
describe('when it fails to fetch commits', () => {
|
describe('when it fails to fetch commits', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
td.when(core.getInput('configFile')).thenReturn('./commitlint.config.js')
|
td.when(mockCore.getInput('configFile')).thenReturn(
|
||||||
|
'./commitlint.config.mjs',
|
||||||
|
)
|
||||||
await createPullRequestEventPayload(cwd)
|
await createPullRequestEventPayload(cwd)
|
||||||
updatePullRequestEnvVars(cwd)
|
updatePullRequestEnvVars(cwd)
|
||||||
td.when(
|
td.when(
|
||||||
listCommits({
|
mockListCommits({
|
||||||
owner: 'wagoid',
|
owner: 'wagoid',
|
||||||
repo: 'commitlint-github-action',
|
repo: 'commitlint-github-action',
|
||||||
pull_number: '1',
|
pull_number: '1',
|
||||||
|
|
@ -391,7 +434,7 @@ describe('Commit Linter action', () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(
|
td.verify(
|
||||||
core.setFailed(
|
mockCore.setFailed(
|
||||||
contains("error trying to get list of pull request's commits"),
|
contains("error trying to get list of pull request's commits"),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
@ -400,7 +443,7 @@ describe('Commit Linter action', () => {
|
||||||
it('should show the original error message', async () => {
|
it('should show the original error message', async () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(contains('HttpError: Bad credentials')))
|
td.verify(mockCore.setFailed(contains('HttpError: Bad credentials')))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -411,7 +454,7 @@ describe('Commit Linter action', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
await createPushEventPayload(cwd, { commits: [commit] })
|
await createPushEventPayload(cwd, { commits: [commit] })
|
||||||
updatePushEnvVars(cwd)
|
updatePushEnvVars(cwd)
|
||||||
td.replace(process, 'cwd', () => cwd)
|
td.replace(process, 'cwd', () => cwd)
|
||||||
|
|
@ -421,7 +464,7 @@ describe('Commit Linter action', () => {
|
||||||
it('should pass', async () => {
|
it('should pass', async () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true })
|
td.verify(mockCore.setFailed(), { times: 0, ignoreExtraArgs: true })
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should show success message', async () => {
|
it('should show success message', async () => {
|
||||||
|
|
@ -443,7 +486,7 @@ describe('Commit Linter action', () => {
|
||||||
|
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setOutput(resultsOutputId, expectedResultsOutput))
|
td.verify(mockCore.setOutput(resultsOutputId, expectedResultsOutput))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -460,7 +503,7 @@ describe('Commit Linter action', () => {
|
||||||
message:
|
message:
|
||||||
'chore: correct message\nsome context without leading blank line',
|
'chore: correct message\nsome context without leading blank line',
|
||||||
}
|
}
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [commitWithWarning, correctCommit],
|
commits: [commitWithWarning, correctCommit],
|
||||||
})
|
})
|
||||||
|
|
@ -490,33 +533,33 @@ describe('Commit Linter action', () => {
|
||||||
it('should pass and show that warnings exist', async () => {
|
it('should pass and show that warnings exist', async () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true })
|
td.verify(mockCore.setFailed(), { times: 0, ignoreExtraArgs: true })
|
||||||
td.verify(console.log(contains('You have commit messages with warnings')))
|
td.verify(console.log(contains('You have commit messages with warnings')))
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should show the results in an output', async () => {
|
it('should show the results in an output', async () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setOutput(resultsOutputId, expectedResultsOutput))
|
td.verify(mockCore.setOutput(resultsOutputId, expectedResultsOutput))
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('and failOnWarnings is set to true', () => {
|
describe('and failOnWarnings is set to true', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
td.when(core.getInput('failOnWarnings')).thenReturn('true')
|
td.when(mockCore.getInput('failOnWarnings')).thenReturn('true')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should fail', async () => {
|
it('should fail', async () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(
|
td.verify(
|
||||||
core.setFailed(contains('You have commit messages with errors')),
|
mockCore.setFailed(contains('You have commit messages with errors')),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should show the results in an output', async () => {
|
it('should show the results in an output', async () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setOutput(resultsOutputId, expectedResultsOutput))
|
td.verify(mockCore.setOutput(resultsOutputId, expectedResultsOutput))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -533,7 +576,7 @@ describe('Commit Linter action', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [wrongCommit, commitWithWarning],
|
commits: [wrongCommit, commitWithWarning],
|
||||||
})
|
})
|
||||||
|
|
@ -546,7 +589,7 @@ describe('Commit Linter action', () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(
|
td.verify(
|
||||||
core.setFailed(contains('You have commit messages with errors')),
|
mockCore.setFailed(contains('You have commit messages with errors')),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -571,19 +614,19 @@ describe('Commit Linter action', () => {
|
||||||
|
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setOutput(resultsOutputId, expectedResultsOutput))
|
td.verify(mockCore.setOutput(resultsOutputId, expectedResultsOutput))
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('and failOnWarnings is set to true', () => {
|
describe('and failOnWarnings is set to true', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
td.when(core.getInput('failOnWarnings')).thenReturn('true')
|
td.when(mockCore.getInput('failOnWarnings')).thenReturn('true')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should fail', async () => {
|
it('should fail', async () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(
|
td.verify(
|
||||||
core.setFailed(contains('You have commit messages with errors')),
|
mockCore.setFailed(contains('You have commit messages with errors')),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -591,7 +634,7 @@ describe('Commit Linter action', () => {
|
||||||
|
|
||||||
describe('when commit contains required signed-off-by message', () => {
|
describe('when commit contains required signed-off-by message', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
cwd = await git.bootstrap('fixtures/signed-off-by')
|
cwd = await git.bootstrap('fixtures/signed-off-by', process.cwd())
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [
|
commits: [
|
||||||
{
|
{
|
||||||
|
|
@ -609,14 +652,14 @@ describe('Commit Linter action', () => {
|
||||||
it('should pass', async () => {
|
it('should pass', async () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true })
|
td.verify(mockCore.setFailed(), { times: 0, ignoreExtraArgs: true })
|
||||||
td.verify(console.log('Lint free! 🎉'))
|
td.verify(console.log('Lint free! 🎉'))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('when a different helpUrl is provided in the config', () => {
|
describe('when a different helpUrl is provided in the config', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
cwd = await git.bootstrap('fixtures/custom-help-url')
|
cwd = await git.bootstrap('fixtures/custom-help-url', process.cwd())
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [
|
commits: [
|
||||||
{
|
{
|
||||||
|
|
@ -634,9 +677,9 @@ describe('Commit Linter action', () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(
|
td.verify(
|
||||||
core.setFailed(contains('You have commit messages with errors')),
|
mockCore.setFailed(contains('You have commit messages with errors')),
|
||||||
)
|
)
|
||||||
td.verify(core.setFailed(contains(' https://example.org')))
|
td.verify(mockCore.setFailed(contains(' https://example.org')))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -647,7 +690,7 @@ describe('Commit Linter action', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
cwd = await git.bootstrap('fixtures/conventional')
|
cwd = await git.bootstrap('fixtures/conventional', process.cwd())
|
||||||
await createPushEventPayload(cwd, {
|
await createPushEventPayload(cwd, {
|
||||||
commits: [
|
commits: [
|
||||||
{ id: 'correct-commit', message: 'chore: correct message 2' },
|
{ id: 'correct-commit', message: 'chore: correct message 2' },
|
||||||
|
|
@ -660,25 +703,25 @@ describe('Commit Linter action', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should pass when only considering messages defined by commitDepth', async () => {
|
it('should pass when only considering messages defined by commitDepth', async () => {
|
||||||
td.when(core.getInput('commitDepth')).thenReturn('1')
|
td.when(mockCore.getInput('commitDepth')).thenReturn('1')
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true })
|
td.verify(mockCore.setFailed(), { times: 0, ignoreExtraArgs: true })
|
||||||
td.verify(console.log('Lint free! 🎉'))
|
td.verify(console.log('Lint free! 🎉'))
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should fail when older commits have lint errors', async () => {
|
it('should fail when older commits have lint errors', async () => {
|
||||||
td.when(core.getInput('commitDepth')).thenReturn('2')
|
td.when(mockCore.getInput('commitDepth')).thenReturn('2')
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(contains(incorrectCommit.message)))
|
td.verify(mockCore.setFailed(contains(incorrectCommit.message)))
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should consider all commits when an invalid commit depth is passed in config', async () => {
|
it('should consider all commits when an invalid commit depth is passed in config', async () => {
|
||||||
td.when(core.getInput('commitDepth')).thenReturn('xzy')
|
td.when(mockCore.getInput('commitDepth')).thenReturn('xzy')
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(contains(incorrectCommit.message)))
|
td.verify(mockCore.setFailed(contains(incorrectCommit.message)))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
Loading…
Reference in a new issue