Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
| parameter | description | required | default |
| --- | --- | --- | --- |
| config-file | The config file to present to commitlint-github-action | `true` | .commitlintrc.yaml |
| disable-commitlint | Set this to "true" to disable commitlint entirely | `false` | false |
| turo-conventional-commit | Set this to "false" to customize conventional commit configuration | `true` | true |
| only-changed | Set this to "true" to only run pre-commit against changed files, and not the entire repository | `false` | |
| stage | Set this to run pre-commit against a specific stage of the pre-commit hooks. | `false` | |
Expand Down
7 changes: 6 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ inputs:
required: true
description: The config file to present to commitlint-github-action
default: .commitlintrc.yaml
disable-commitlint:
required: false
description: Set this to "true" to disable commitlint entirely
default: "false"
turo-conventional-commit:
required: true
description: Set this to "false" to customize conventional commit configuration
Expand Down Expand Up @@ -89,6 +93,7 @@ runs:
node-version: ${{ steps.node-version.outputs.version }}
- name: Commitlint
# This version needs to be sync'd with the repo HEAD if a major version is cut
if: inputs.disable-commitlint != 'true'
uses: open-turo/action-pre-commit/commitlint@v3
with:
restore-config: "false"
Expand Down Expand Up @@ -152,7 +157,7 @@ runs:
PRE_COMMIT_HOME: ${{ runner.temp }}/${{ github.event.repository.name }}/cache-pre-commit-${{ steps.pre_commit_cache_key.outputs.key }}

- name: Restore commitlint config
if: always() && hashFiles(inputs.config-file) != '' && inputs.turo-conventional-commit == 'true'
if: always() && inputs.disable-commitlint != 'true' && hashFiles(inputs.config-file) != '' && inputs.turo-conventional-commit == 'true'
shell: bash
env:
CONFIG_FILE: ${{ inputs.config-file }}
Expand Down
Loading