mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2025-11-07 08:06:54 +00:00
Merge pull request #26 from wagoid/feat/add-help-url-parameter
feat: add helpURL parameter
This commit is contained in:
commit
6a11c8c653
4 changed files with 18 additions and 7 deletions
|
|
@ -38,8 +38,7 @@ Default: `commitlint.config.js`
|
|||
|
||||
When set to true, we follow only the first parent commit when seeing a merge commit.
|
||||
|
||||
This helps to ignore errors in commits that were already present in your default branch (e.g. `master`) before adding conventional commit checks.
|
||||
More info in [git-log docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---first-parent).
|
||||
This helps to ignore errors in commits that were already present in your default branch (e.g. `master`) before adding conventional commit checks. More info in [git-log docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---first-parent).
|
||||
|
||||
Default: `true`
|
||||
|
||||
|
|
@ -49,6 +48,12 @@ Whether you want to fail on warnings or not.
|
|||
|
||||
Default: `false`
|
||||
|
||||
### `helpURL`
|
||||
|
||||
Link to a page explaining your commit message convention.
|
||||
|
||||
default: `https://github.com/conventional-changelog/commitlint/#what-is-commitlint`
|
||||
|
||||
## About `extends` in your config file
|
||||
|
||||
This is a [`Docker` action](https://github.com/actions/toolkit/blob/e2adf403d6d14a9ca7474976ccaca20f72ff8209/docs/action-types.md#why-would-i-choose-a-docker-action), and was made like this so that you can run it with minimum setup, regardless of your repo's environment. It comes packed with the most famous shared configurations that you can use in your commitlint config's `extends` field:
|
||||
|
|
|
|||
|
|
@ -106,8 +106,7 @@ const formatErrors = results =>
|
|||
{ results },
|
||||
{
|
||||
color: true,
|
||||
helpUrl:
|
||||
'https://github.com/conventional-changelog/commitlint/#what-is-commitlint',
|
||||
helpUrl: core.getInput('helpURL'),
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ describe('Commit Linter action', () => {
|
|||
td.when(core.getInput('configFile')).thenReturn('./commitlint.config.js')
|
||||
td.when(core.getInput('firstParent')).thenReturn('true')
|
||||
td.when(core.getInput('failOnWarnings')).thenReturn('false')
|
||||
td.when(core.getInput('helpURL')).thenReturn(
|
||||
'https://github.com/conventional-changelog/commitlint/#what-is-commitlint',
|
||||
)
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
|
|
|
|||
10
action.yml
10
action.yml
|
|
@ -3,17 +3,21 @@ description: 'Lints Pull Request commit messages with commitlint'
|
|||
author: 'Wagner Santos'
|
||||
inputs:
|
||||
configFile:
|
||||
description: 'commitlint config file'
|
||||
description: 'Commitlint config file'
|
||||
default: './commitlint.config.js'
|
||||
required: false
|
||||
firstParent:
|
||||
description: 'when set to true, we follow only the first parent commit when seeing a merge commit. More info in git-log docs https://git-scm.com/docs/git-log#Documentation/git-log.txt---first-parent'
|
||||
description: 'When set to true, we follow only the first parent commit when seeing a merge commit. More info in git-log docs https://git-scm.com/docs/git-log#Documentation/git-log.txt---first-parent'
|
||||
default: 'true'
|
||||
required: false
|
||||
failOnWarnings:
|
||||
description: 'whether you want to fail on warnings or not'
|
||||
description: 'Whether you want to fail on warnings or not'
|
||||
default: 'false'
|
||||
required: false
|
||||
helpURL:
|
||||
description: 'Link to a page explaining your commit message convention'
|
||||
default: 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint'
|
||||
required: false
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'docker://wagoid/commitlint-github-action:1.3.2'
|
||||
|
|
|
|||
Loading…
Reference in a new issue