feat: Add custom conventional commit check#131
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new reusable workflow that allows callers to customize the allowed Conventional Commit “type” prefixes for PR titles, and refactors the existing check-pr-title.yml workflow to delegate to this new customizable workflow while preserving the current default type list.
Changes:
- Refactor existing PR title check workflow to call a new reusable workflow.
- Add
check-pr-title-custom.ymlreusable workflow with an input for allowed Conventional Commit types.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/check-pr-title.yml | Converts the existing reusable workflow into a thin wrapper that calls the new customizable workflow with the current default type list. |
| .github/workflows/check-pr-title-custom.yml | Adds a new reusable workflow that runs the conventional-commit title validator and an additional capitalization check, with configurable allowed types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: | | ||
| if [[ ! "${TITLE}" =~ ^[a-z]+:\ [\[A-Z] ]]; then | ||
| echo "Error: Title must start with an uppercase letter after the prefix." | ||
| exit 1 | ||
| fi |
| echo "Error: Title must start with an uppercase letter after the prefix." | ||
| exit 1 | ||
| fi | ||
| uses: ./.github/workflows/check-pr-title-custom.yml |
There was a problem hiding this comment.
This might not work when launched outside of this repo - I'm not 100% sure, but it might not resolve to the .github of this repo, when being launched from the outside world
Please, investigate, and repo might need to be explicitly specified.
In that case, it would also need to specift a hash commit
This PR adds a customizable version of the PR title check (separate from the existing check)