ci: waive the PR-body template check for bot-authored PRs#415
Merged
Conversation
The pr-body job enforced the human What/Why/How-to-verify template on every pull request, including dependabot's. Dependabot writes its own changelog-shaped body that carries none of those sections, so the check failed and the CI success rollup went red on every dependency bump. The only way to green one was to hand-edit the bot's body and force a re-run, a manual workaround repeated on every bump. Waive the template requirement when the PR author is a bot. The job still runs so the check reports a real status rather than a skipped one (the ci-success rollup and branch protection stay unaffected), and its enforcement step exits 0 when the event payload's author type is Bot. That covers dependabot and any other forge bot without naming a login, and human PRs are still held to the template exactly as before.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What
Waives the "PR body follows template" check for bot-authored pull requests. The
pr-bodyjob still runs, so the check reports a real success status, but its enforcement step exits early when the event payload's author type isBot. Human pull requests are held to the## What / ## Why / ## How to verifytemplate exactly as before.Why
The template gate ran on every pull request, dependabot's included. Dependabot writes its own changelog-shaped body (release notes, commit ranges) that carries none of the required sections, so the check failed and the CI success rollup went red on every dependency bump. The only way to green one was to hand-edit the bot's body to prepend the template and force a re-run, since an edit is not a CI trigger. That is a manual workaround repeated on every bump, not a fix. The template is a rule for humans; a bot's body is not ours to rewrite.
Keeping the job running rather than skipping it means the check still reports a status, so the
ci-successaggregator and branch protection are unaffected. Reading the author type from the payload covers dependabot and any other forge bot without hardcoding a login.How to verify
On this PR (human-authored) the check runs and passes because the body carries all three sections. The next dependabot PR, once rebased onto this change, reports the check green without a hand-edited body.