GitHub action for checking pull request titles against a provided pattern - commonly used to remind users to add Jira ticket IDs to their PR title and/or enforcing semantic titles that follow conventional-commits
- uses: clowdhaus/actions/pr-title@main
with:
# GitHub token which contains access to the repository
github-token: ${{ secrets.GITHUB_TOKEN }}
# Regex pattern that PR title is evaluated against
title-regex: ''
# Determines whether changes are required when the title does not match the pattern
on-fail-request-changes: true|false
# Determines whether a comment should be left when the title does not match the pattern
on-fail-add-comment: true|false
# Message posted to user via requested changes or through a comment
on-fail-message: ''
# Determines whether the action should be marked as failed when title does not match pattern
on-fail-fail-action: true|false
# Comma-delimited string of Github Usernames who are exempted from this rule (e.g. dependabot[bot])
ignored-contributors: ''
- uses: clowdhaus/actions/pr-title@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: clowdhaus/actions/pr-title@main
with:
title-regex: '^\[JIRA-[0-9]{1,4}]'
on-fail-request-changes: true
on-fail-add-comment: false
on-fail-message: 'Your pull request title does not match the provided pattern: `%regex%`'
github-token: ${{ secrets.GITHUB_TOKEN }}
Comment on pull request when the title does not match the default pattern... unless the user is dependabot
- uses: clowdhaus/actions/pr-title@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
ignored-contributors: 'dependabot[bot]'