ci: enforce and document Conventional Commits for PR titles#623
ci: enforce and document Conventional Commits for PR titles#623wmmc88 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the CONTRIBUTING.md file to mandate the Conventional Commits specification for PR titles and bodies (since PRs are squash-merged), and fixes a stale branch reference. It supersedes #298.
Changes:
- Added guidance to use the Conventional Commits specification for both PR title and body
- Fixed stale
masterbranch reference tomainin the rebase instruction - Cleaned up and clarified the "Submitting a Pull Request" bullet points (reformatted for readability)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #623 +/- ##
=======================================
Coverage 77.42% 77.42%
=======================================
Files 24 24
Lines 4851 4851
Branches 4851 4851
=======================================
Hits 3756 3756
Misses 978 978
Partials 117 117 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a81f336 to
261bff3
Compare
261bff3 to
a81f336
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a81f336 to
5a320ab
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
.github/workflows/lint-pr-title.yaml:63
- This
== nullcondition likely never matches because missing step outputs are exposed as empty strings in GitHub Actions expressions. As a result, the sticky error comment may never be deleted after the title is fixed. Consider checking for an empty string (and/or gating withsuccess()).
- name: Delete error comment when resolved
if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Post error comment on PR | ||
| if: always() && (steps.lint_pr_title.outputs.error_message != null) | ||
| uses: marocchino/sticky-pull-request-comment@v2 |
Update CONTRIBUTING.md with comprehensive Conventional Commits guidance including allowed types, optional crate-name scopes, breaking change syntax, and examples. Add lint-pr-title.yaml GitHub Action using amannn/action-semantic-pull-request@v6 to enforce the convention on PR titles with sticky PR comments for contributor-friendly error messages.
5a320ab to
2bc8a5f
Compare
Summary
Updates CONTRIBUTING.md with comprehensive Conventional Commits guidance and adds a GitHub Action to enforce it on PR titles.
Builds on the earlier work in #298 by @leon-xd.
Changes
CONTRIBUTING.md
.github/workflows/lint-pr-title.yaml
Context
This repo already follows Conventional Commits in practice but it was not explicitly documented or enforced. This PR formalizes the existing convention. The action uses the default commitizen types which cover all types currently used in the repo (chore, fix, ci, refactor, feat, docs, test, style, build, perf, revert).
34 other Microsoft repos already use this same action, including SynapseML, terraform-provider-fabric, fabric-sdk-go, and oxidizer.
Supersedes #298.