Skip to content

ci: waive the PR-body template check for bot-authored PRs#415

Merged
ion-alpha-dev merged 1 commit into
mainfrom
ci/skip-pr-body-for-bots
Jul 15, 2026
Merged

ci: waive the PR-body template check for bot-authored PRs#415
ion-alpha-dev merged 1 commit into
mainfrom
ci/skip-pr-body-for-bots

Conversation

@ion-alpha-dev

Copy link
Copy Markdown
Collaborator

What

Waives the "PR body follows template" check for bot-authored pull requests. The pr-body job still runs, so the check reports a real success status, but its enforcement step exits early when the event payload's author type is Bot. Human pull requests are held to the ## What / ## Why / ## How to verify template 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-success aggregator 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

# A human PR with a body missing a section still fails:
BODY="## What only" AUTHOR_TYPE="User" bash -c '
  missing=0
  for s in "## What" "## Why" "## How to verify"; do case "$BODY" in *"$s"*) ;; *) missing=1;; esac; done
  [ "$missing" -eq 0 ]'; echo "human exit: $?"   # non-zero

# A bot PR is waived regardless of body:
AUTHOR_TYPE="Bot" bash -c '[ "$AUTHOR_TYPE" = "Bot" ] && exit 0'; echo "bot exit: $?"   # 0

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.

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

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ion-alpha-dev
ion-alpha-dev merged commit 2ff038f into main Jul 15, 2026
26 checks passed
@ion-alpha-dev
ion-alpha-dev deleted the ci/skip-pr-body-for-bots branch July 15, 2026 10:46
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant