feat(action): need a custom action for `commitlint`
@aRustyDev ci sta già lavorando.
Dal 19/1/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Goals
- checks if PR titles conform commitlint header
- checks if PR body conforms to commitlint body
- If it's run as a result of a pull request, it lints all the commits from the pull request (up to 250). If it's run as the result of a push, it lints all the commits in that branch. Otherwise, it lints all the commits on the default branch
- based on the action event_name.
push: The last commit; fromHEAD~1toHEADpull_request: from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} to ${{ github.event.pull_request.head.sha }}
- based on the action event_name.
- configure your GitHub repository to use the squash & merge strategy and tick the option "Default to PR title for squash merge commits".
- filter by author
- exclude merged commits
-
commitDepth: limits to N most recent - Check best practices:
- Enable "Require linear history" in branch protection rules
- Enable "Require signed commits" in branch protection rules
- Enable "Require signed web commits" in branch protection rules
{
"LABEL": {
"name": "title/description needs formatting",
"color": "EEEEEE"
},
"CHECKS": {
"prefixes": ["fix: ", "feat: "],
"regexp": "docs\\(v[0-9]\\): ",
"regexpFlags": "i",
"ignoreLabels" : ["dont-check-PRs-with-this-label", "meta"]
},
"MESSAGES": {
"success": "All OK",
"failure": "Failing CI test",
"notice": ""
}
}
Permissions
- 'contents': read : This allows the action to list commits of the repository.
- 'pull-requests': read : This allows the action to list the commits in a Pull Request.
Inputs
config: `Path to commit lint config'- 'debug':
- 'dry-run':
- 'download-dependencies': Experimental - use node to download commitlint config dependency (eg. @commitlint/config-conventional) Default : 'ignore'
- 'timeout': Change the default timeout for the action (in s). Default : '25'
- 'body': Pass the body of the PR to the commit as the body. Default : 'false'
- 'token': GitHub Token for fetching commits using the GitHub API
- 'fail_on_error': Whether the GitHub Action should fail if commitlint detects an issue.
- 'configuration_path': path to action config. Default : '.github/pr-merge-commitlint.json'
- 'pass_on_octokit_error': ... Default: 'false'
- 'commitlint_version': ... Default : 'latest'
- 'pr_title': PR title. Default : ${{ github.event.pull_request.title }}
- 'config_file': Commitlint configuration file path. Default : null
- 'config': Commitlint configuration plaintext, ignored if config_file provided. Default : module.exports = { extends: ["@commitlint/config-conventional"] };
- 'node_modules': Path to node_modules directory. Default : null
- 'node_version': Node.js version, ignored if node_modules provided. Default : v20.15.1
- 'commitlint_version': Commitlint version, ignored if node_modules provided. Default : ^19.5.0
- 'additional_node_dependencies': Additional node dependencies, ignored if node_modules is provided. Default : @commitlint/config-conventional@^19.5.0
- 'base_ref': The source of pull request that triggered this workflow (required for pull requests). Default : ${{ github.base_ref }}
- 'head_ref': The destination of the pull request that triggered this workflow (required for pull requests). Default : ${{ github.head_ref }}
- 'target_ref': The Github SHA of the event that triggered this workflow. Default : ${{ github.sha }}
- 'ref_name': The name of the ref (branch or tag) of the event that triggered this workflow (required for pushes). Default : ${{ github.ref_name }}
- 'ref_type': The ref type of the event that triggered this workflow (required for pushes). Only branch refs are validated. Default : ${{ github.ref_type }}
- 'extra_config': An optional newline-separated list of commitlint-config npm packages to install. Default : ''
Outputs
- 'lint-status'
- 'lint-details'
- 'exit_code'
- 'stdout'
- 'stderr'
- 'pr_title'
- 'pr_number'
- 'valid'
- 'outcomes': structured Array as JSON string of the validation feedback
- 'report': The formatted string report of the validation outcomes'
Resources
- Lingua principale
- Shell
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aRustyDev/gh
-
dependencies github-actions
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 10/100
-
dependencies github-actions
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 15/100
-
dependencies github-actions
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 50/100
-
dependencies github-actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 20/100
-
dependencies github-actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 10/100
Tutte le issue di aRustyDev/gh
Issue simili
-
align on terminology Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
CycloneDX/transparency-exchange-api#393 · 1 commento ·
-
module/agent platform/macos type/bug/regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
CachyOS/cachyos-aur-derived#754 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
CrowdStrike/falcon-scripts#528 ·
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100