Skip to content

ci: enforce and document Conventional Commits for PR titles#623

Open
wmmc88 wants to merge 1 commit intomicrosoft:mainfrom
wmmc88:contributing-conventional-commits
Open

ci: enforce and document Conventional Commits for PR titles#623
wmmc88 wants to merge 1 commit intomicrosoft:mainfrom
wmmc88:contributing-conventional-commits

Conversation

@wmmc88
Copy link
Copy Markdown
Collaborator

@wmmc88 wmmc88 commented Mar 4, 2026

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

  • Expanded the PR title requirements into a dedicated section
  • Documented all valid commit types with descriptions (feat, fix, docs, ci, chore, etc.)
  • Defined crate names as the valid optional scopes (cargo-wdk, wdk, wdk-alloc, wdk-build, wdk-macros, wdk-panic, wdk-sys)
  • Clarified that scope is optional and should be omitted for cross-cutting changes
  • Documented breaking change syntax with examples
  • Added real examples drawn from the repo history

.github/workflows/lint-pr-title.yaml

  • Added \�mannn/action-semantic-pull-request@v6\ to validate PR titles
  • Configured allowed scopes to crate names only (optional)
  • Uses \pull_request_target\ trigger (safe for fork-based PRs)
  • Includes sticky PR comment via \marocchino/sticky-pull-request-comment@v2\ for contributor-friendly error messages that auto-delete when resolved

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.

Copilot AI review requested due to automatic review settings March 4, 2026 19:13
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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 master branch reference to main in 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-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.42%. Comparing base (e1821cd) to head (2bc8a5f).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wmmc88 wmmc88 marked this pull request as draft March 5, 2026 02:05
@wmmc88 wmmc88 force-pushed the contributing-conventional-commits branch from a81f336 to 261bff3 Compare March 10, 2026 02:08
Copilot AI review requested due to automatic review settings March 10, 2026 17:44
@wmmc88 wmmc88 force-pushed the contributing-conventional-commits branch from 261bff3 to a81f336 Compare March 10, 2026 17:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@wmmc88 wmmc88 force-pushed the contributing-conventional-commits branch from a81f336 to 5a320ab Compare March 16, 2026 23:45
@wmmc88 wmmc88 changed the title docs: mandate conventional commits for PR title and body docs: document and enforce Conventional Commits for PR titles Mar 16, 2026
@wmmc88 wmmc88 changed the title docs: document and enforce Conventional Commits for PR titles ci: enforce and document Conventional Commits for PR titles Mar 17, 2026
@wmmc88 wmmc88 marked this pull request as ready for review March 17, 2026 21:54
Copilot AI review requested due to automatic review settings March 17, 2026 21:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 == null condition 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 with success()).
      - 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.

Comment on lines +35 to +37
- 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.
@wmmc88 wmmc88 force-pushed the contributing-conventional-commits branch from 5a320ab to 2bc8a5f Compare March 24, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants