GitHub Action
Conventional PR Title
Please note that no further updates or developments are planned for this repository in the future. The implementation and functionality constraints associated with the conventional-changelog
packages and the limitations in the data extraction process have led to this decision. For those seeking a maintained and active alternative with mostly similar functionalities, it is recommended to switch to amannn/action-semantic-pull-request
.
Thank you for your support and understanding.
This is a GitHub Action that ensures your PR title matches the Conventional Commits spec.
This is helpful when you're using semantic-release with the Conventional Commits preset. When using the Squash and merge
strategy, GitHub will suggest to use the PR title as the commit message. With this action you can validate that the PR title will lead to a correct commit message.
See Conventional Commits for sample titles.
Optional. Description of the status check if validation succeeds.
Default:
"Title follows the specification."
.
Optional. Description of the status check if validation fails.
Default:
"Title does not follow the specification."
.
Optional. Persistent status check context key.
Default:
"conventional-pr-title"
.
Optional. Conventional changelog preset.
Default:
"[email protected]"
.
Optional. URL to be used when linking the "Details" in the actions overview.
Default:
"https://www.conventionalcommits.org/en/v1.0.0/#summary"
.
true
if the validation succeed, false
otherwise.
In case of an error (success=false
), contains the error message for additional processing or usage in notifications.
name: Check PR title
on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize
jobs:
lint:
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- uses: aslafy-z/conventional-pr-title-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Note: Avoid using
main
ref, prefer to pin to a specific version.
All thanks goes to amannn
's semantic-pull-request
action.