-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(ci): add PR title check workflow #12340
Conversation
Add PR title check workflow Add colon Add colon Request change to PR title instead of blocking PR Request change to PR title instead of blocking PR Remove change requested if title conforms to the formate Remove change requested if title conforms to the formate
fix: workflow: Ensure PR title check posts review comments
Add fail if title is invalid
fix: workflow: Ensure PR title check fails for invalid titles
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.
Please update the PR title to match the required format: <type>: <scope>: <subject>
Types: feat, fix, docs, style, refactor, test, chore
Scope: required
Subject: start with lowercase
PR title now matches the required format.
refactor: pr-title-check: Streamline workflow and reduce complexity
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.
Please update the PR title to match the required format: <type>: <scope>: <subject>
Types: feat, fix, docs, style, refactor, test, chore
Scope: required
Subject: start with lowercase
Confirm that creating a PR with a invalid title format is being requested for change by the GA bot, as per this comment. |
PR title now matches the required format.
Update allowed PR-types pattern
Co-authored-by: Rod Vagg <rod@vagg.org>
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.
Please update the PR title to match the required format: <type>: <area>: <subject>
Types: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test, chore
Area: e.g. api, chain, state, mempool, multisig, networking, paych, proving, sealing, wallet, deps
Subject: start with lowercase
PR title now matches the required format.
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.
A few thoughts:
- (raised inline) Any reason we're not just following https://www.conventionalcommits.org/en/v1.0.0/ style?
- Do we expect to want to roll this out to other FilOz-maintained repos? I assume IPDX has ideas on how this could be done (asked here).
- What are the thoughts on using a 3rd party action? I realize there's not a lot of code here so it's not a big gain, but others have solved this problem. Examples:
- https://github.com/marketplace/actions/pr-title-checker
- https://github.com/marketplace/actions/pr-title-verify
- https://github.com/Slashgear/action-check-pr-title
My impetus for raising this is the value for keeping it concise probably goes up if we do want to copy this across multiple repos.
fwiw I prefer conventional commit style and use it everywhere else, this is the repo that stands out as different in the world of repos I contribute to; but change can be hard for people that have got used to it One option is to do both for a while and have a migration period.
|
Seems good/reasonable to me. We could still update our PR template text to steer at the conventional commit style. Also, I'm realizing we'll need to update the regex to account for |
I will adjust the PR accordignly |
In 2cf80e7, I have changed:
|
While we are discussing conventions, referring to: Conventional Commits.
While this convention is primarily for commits (which Rod also has advocated for following: #12238 (comment)), it would be valuable to extend it to PR titles as well, particularly as we default to "squash and merge". By appending a ! after the in the PR title, we can clearly signal that the change is breaking. |
Adjust pull_request_template.md according to the changes introduced with the PR title check workflow
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.
Please update the PR title to match one of the required formats:
<type>: <scope>: <subject>
<type>(<scope>): <subject>
Types: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test
Area/Scope: api, chain, state, mempool, multisig, networking, paych, proving, sealing, wallet, deps
Subject: start with lowercase
Optionally, you can add "[skip changelog]" at the start of the title if the change does not require a CHANGELOG.md entry.
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.
Please update the PR title to match one of the required formats:
<type>: <scope>: <subject>
<type>(<scope>): <subject>
Types: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test
Area/Scope: api, chain, state, mempool, multisig, networking, paych, proving, sealing, wallet, deps
Subject: start with lowercase
Optionally, you can add "[skip changelog]" at the start of the title if the change does not require a CHANGELOG.md entry.
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.
Please update the PR title to match one of the required formats:
<type>: <scope>: <subject>
<type>(<scope>): <subject>
Types: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test
Area/Scope: api, chain, state, mempool, multisig, networking, paych, proving, sealing, wallet, deps
Subject: start with lowercase
Optionally, you can add "[skip changelog]" at the start of the title if the change does not require a CHANGELOG.md entry.
PR title now matches the required format.
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.
Please update the PR title to match one of the required formats:
<type>: <scope>: <subject>
<type>(<scope>): <subject>
Types: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test
Area/Scope: api, chain, state, mempool, multisig, networking, paych, proving, sealing, wallet, deps
Subject: start with lowercase
Optionally, you can add "[skip changelog]" at the start of the title if the change does not require a CHANGELOG.md entry.
fix(ci): update regex to support both PR title formats
PR title now matches the required format.
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.
I'm good with this getting merged once feedback incorporated.
I created another PR on top of your PR that starts extracting out some of these contributing conventions as part of #12360
…12361) This starts on #12360 as part of landing #12340 * Update .github/workflows/pr-title-check.yml Co-authored-by: Phi-rjan <orjan.roren@gmail.com> * Update CONTRIBUTING.md Co-authored-by: Phi-rjan <orjan.roren@gmail.com> * Update CONTRIBUTING.md Co-authored-by: Phi-rjan <orjan.roren@gmail.com> * Update CONTRIBUTING.md Co-authored-by: Phi-rjan <orjan.roren@gmail.com> --------- Co-authored-by: Phi-rjan <orjan.roren@gmail.com>
PR title now matches the required format.
Co-authored-by: Steve Loeppky <biglep@protocol.ai>
* Add PR title check workflow Add PR title check workflow Add colon Add colon Request change to PR title instead of blocking PR Request change to PR title instead of blocking PR Remove change requested if title conforms to the formate Remove change requested if title conforms to the formate * fix: workflow: Ensure PR title check posts review comments fix: workflow: Ensure PR title check posts review comments * Add fail if title is invalid Add fail if title is invalid * fix: workflow: Ensure PR title check fails for invalid titles fix: workflow: Ensure PR title check fails for invalid titles * refactor: pr-title-check: Streamline workflow and reduce complexity refactor: pr-title-check: Streamline workflow and reduce complexity * Update allowed PR-types pattern Update allowed PR-types pattern * Update pr-title-check.yml Co-authored-by: Rod Vagg <rod@vagg.org> * Use conventional commit, but allow for legacy - Allow optional "[skip changelog]" prefix - Both <type>: <scope>: and <type>(<scope>): formats - Use conventional commit "scope" instead of area - Alphabetize <type> and <scope> * docs: update pull_request_template.md Adjust pull_request_template.md according to the changes introduced with the PR title check workflow * fix(ci): update regex to support both PR title formats fix(ci): update regex to support both PR title formats * docs: seed CONTRIBUTING.md with pr title and changelog expectations (filecoin-project#12361) This starts on filecoin-project#12360 as part of landing filecoin-project#12340 * Update .github/workflows/pr-title-check.yml Co-authored-by: Phi-rjan <orjan.roren@gmail.com> * Update CONTRIBUTING.md Co-authored-by: Phi-rjan <orjan.roren@gmail.com> * Update CONTRIBUTING.md Co-authored-by: Phi-rjan <orjan.roren@gmail.com> * Update CONTRIBUTING.md Co-authored-by: Phi-rjan <orjan.roren@gmail.com> --------- Co-authored-by: Phi-rjan <orjan.roren@gmail.com> * Update .github/workflows/pr-title-check.yml Co-authored-by: Steve Loeppky <biglep@protocol.ai> --------- Co-authored-by: Rod Vagg <rod@vagg.org> Co-authored-by: Steve Loeppky <biglep@protocol.ai>
* Add PR title check workflow Add PR title check workflow Add colon Add colon Request change to PR title instead of blocking PR Request change to PR title instead of blocking PR Remove change requested if title conforms to the formate Remove change requested if title conforms to the formate * fix: workflow: Ensure PR title check posts review comments fix: workflow: Ensure PR title check posts review comments * Add fail if title is invalid Add fail if title is invalid * fix: workflow: Ensure PR title check fails for invalid titles fix: workflow: Ensure PR title check fails for invalid titles * refactor: pr-title-check: Streamline workflow and reduce complexity refactor: pr-title-check: Streamline workflow and reduce complexity * Update allowed PR-types pattern Update allowed PR-types pattern * Update pr-title-check.yml Co-authored-by: Rod Vagg <rod@vagg.org> * Use conventional commit, but allow for legacy - Allow optional "[skip changelog]" prefix - Both <type>: <scope>: and <type>(<scope>): formats - Use conventional commit "scope" instead of area - Alphabetize <type> and <scope> * docs: update pull_request_template.md Adjust pull_request_template.md according to the changes introduced with the PR title check workflow * fix(ci): update regex to support both PR title formats fix(ci): update regex to support both PR title formats * docs: seed CONTRIBUTING.md with pr title and changelog expectations (#12361) This starts on #12360 as part of landing #12340 * Update .github/workflows/pr-title-check.yml Co-authored-by: Phi-rjan <orjan.roren@gmail.com> * Update CONTRIBUTING.md Co-authored-by: Phi-rjan <orjan.roren@gmail.com> * Update CONTRIBUTING.md Co-authored-by: Phi-rjan <orjan.roren@gmail.com> * Update CONTRIBUTING.md Co-authored-by: Phi-rjan <orjan.roren@gmail.com> --------- Co-authored-by: Phi-rjan <orjan.roren@gmail.com> * Update .github/workflows/pr-title-check.yml Co-authored-by: Steve Loeppky <biglep@protocol.ai> --------- Co-authored-by: Rod Vagg <rod@vagg.org> Co-authored-by: Steve Loeppky <biglep@protocol.ai>
For the record, concerning using off-the-shelf tools given we have had to iterate on this a couple times (e.g., PR #12373) , I did a little more researching. I don't think they'll give us fully what we want and we should finish fine-tuning what we started here:
|
Related Issues
Closes: #12148
Proposed Changes
CONTRIBUTING.md
doc that consolidates contributing expectations in one place. Establish CONTRIBUTING.md #12360Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, mempool, multisig, networking, paych, proving, sealing, wallet, deps[skip changelog]
to the PR titleskip/changelog
to the PR