-
Notifications
You must be signed in to change notification settings - Fork 1
ci: Add method for checking conventional commit status #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a post-merge GitHub Actions workflow to enforce conventional commit message format on the main branch. Since GitHub's squash and merge feature allows modifying commit messages, this provides enforcement after merge by checking human-authored commits and creating issues for violations.
- Adds a GitHub Actions workflow that validates commit messages against conventional commit patterns
- Implements bot detection to skip automated commits from tools like Dependabot and Release Please
- Creates comprehensive documentation explaining the workflow and conventional commit requirements
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
.github/workflows/commit-message-enforcement.yaml |
Main workflow that checks commit authors, validates message format, and triggers issue creation |
.github/workflows/README.md |
Documentation explaining the workflow purpose, conventional commit format, and bot detection logic |
.github/scripts/create-commit-issue.js |
Script that creates detailed GitHub issues for commit message violations with formatting guidelines |
Co-authored-by: Copilot <[email protected]> Signed-off-by: Peter Olds <[email protected]>
…ctkit/crib-sdk into COP-1561/conventional-commit
Co-authored-by: Copilot <[email protected]> Signed-off-by: Peter Olds <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Peter Olds <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it opens a new issue and assigns the Human that is attributed with the commit message.
I don't follow the process here.
Why don't we just validate the PR title which can be done with some 3rd party actions like this one: https://github.com/amannn/action-semantic-pull-request
^ this. It doesn’t seem like that action will prevent changing the commit message before merging, which GitHub allows. |
This PR adds a Github Actions workflow that runs after merge to ensure that the commit that was just merged adheres to the conventional commit message format. Because Github allows modifying the commit message prior to merge it's infeasible to have add a commit message check to pre-commit.
This was the best I came up with 🤷🏼♂️. It checks if the commit added follows the standard. If it does not, and was authored by a Human, it opens a new issue and assigns the Human that is attributed with the commit message.