ci: add workflow to check for conventional commit PR titles#41
Merged
Conversation
Co-authored-by: asasine <5421969+asasine@users.noreply.github.com> Agent-Logs-Url: https://github.com/asasine/spongebob/sessions/452cef64-bbc4-4cf9-bf07-44f9c64726be
Co-authored-by: asasine <5421969+asasine@users.noreply.github.com> Agent-Logs-Url: https://github.com/asasine/spongebob/sessions/056e8835-9461-45a6-aadc-ff788701b303
Co-authored-by: asasine <5421969+asasine@users.noreply.github.com> Agent-Logs-Url: https://github.com/asasine/spongebob/sessions/056e8835-9461-45a6-aadc-ff788701b303
asasine
requested changes
Mar 24, 2026
…orkflow Co-authored-by: asasine <5421969+asasine@users.noreply.github.com> Agent-Logs-Url: https://github.com/asasine/spongebob/sessions/8d284569-7830-4561-976e-dba930fca6c6
asasine
requested changes
Mar 24, 2026
…ments Co-authored-by: asasine <5421969+asasine@users.noreply.github.com> Agent-Logs-Url: https://github.com/asasine/spongebob/sessions/6f848dc1-c629-413d-8fb3-61638c53bf62
asasine
requested changes
Mar 24, 2026
| echo "$PR_TITLE" | npx commitlint --color false 2>&1 | tee /tmp/commitlint-output.txt | ||
|
|
||
| - name: Comment on failure | ||
| if: failure() |
Owner
There was a problem hiding this comment.
If there's already a comment and the workflow runs again, the comment will be left outdated. @copilot what would be a good strategy to handle this outdated comment?
Contributor
Author
There was a problem hiding this comment.
Added a "Delete outdated comment on success" step that runs when the lint step passes. It finds and deletes any existing bot failure comment, so the PR isn't left with a stale warning after the title is corrected. See 6b75065.
Co-authored-by: asasine <5421969+asasine@users.noreply.github.com> Agent-Logs-Url: https://github.com/asasine/spongebob/sessions/c9424335-bc43-4da4-9aed-c6cd5338b1b4
asasine
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a GitHub Actions workflow to enforce conventional commit format on PR titles using
@commitlint/config-conventional, with a comment posted on failure.Changes Made
.github/workflows/conventional-commit.yaml— New workflow triggered on PRopened/edited/synchronize/reopenedagainstmain. Installs@commitlint/cliand@commitlint/config-conventional, generates a.commitlintrc.jsonconfig inline (no committed config file needed), pipes the PR title throughcommitlint(with color disabled), and posts a guidance comment with commitlint output on failure. Deduplicates comments by updating existing bot comments. Automatically deletes any outdated failure comment when the title passes validation on a subsequent run.The
editedevent type ensures the workflow re-runs automatically when a PR title is changed.Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.