-
Notifications
You must be signed in to change notification settings - Fork 603
ci: add workflow to enforce conventional commits #15734
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: tomls/base/main
Are you sure you want to change the base?
Conversation
ddstreetmicrosoft
left a comment
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.
some comments only, I'll leave this to Chris for approval
| name: "Check PR Title" | ||
|
|
||
| on: | ||
| pull_request_target: # zizmor: ignore[dangerous-triggers] |
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.
do we need to restrict this to only PRs against tomls/base/main? We don't want this running for all PRs against the entire azl repo, right?
| permissions: | ||
| pull-requests: write # Needed to post comments on PR | ||
| steps: | ||
| - uses: amannn/action-semantic-pull-request@v5 |
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.
is this creating a dependency on an external repo? if so, we should probably clone and use our own repo/branch right?
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - uses: marocchino/sticky-pull-request-comment@v2 |
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.
same question as above about external repo use?
|
|
||
| # Delete a previous comment when the issue has been resolved | ||
| - if: ${{ steps.lint_pr_title.outputs.error_message == null }} | ||
| uses: marocchino/sticky-pull-request-comment@v2 |
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.
same question as above about external repo use?
| if: always() && (steps.lint_pr_title.outputs.error_message != null) | ||
| with: | ||
| header: pr-title-lint-error | ||
| message: | |
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.
Can we also include a TL;DR on common formatting? Probably 99% of commits will want to use just a few common formats, e.g. feat:, fix:, etc.
On the conventialcommits.org page, even the Quick Summary isn't a good reference (IMHO) on the most common uses, it takes a bit of reading to see what options there are
We're planning to adopt Conventional Commits in this branch; this workflow helps guide contributors to following the guidelines.