Skip to content

fix(ci): verify live PR body in template check - #3431

Merged
eleshar merged 2 commits into
developfrom
fix/pr-template-fresh-body
Sep 22, 2026
Merged

eleshar merged 2 commits into
developfrom
fix/pr-template-fresh-body

Conversation

@eleshar

@eleshar eleshar commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

linked issues

N/A - CI workflow fix discovered while clearing PR hygiene failures.

context

  • Severity/Impact: Low (contributor friction: misleading CI failures)
  • Affected versions/environments: pr-template-routing.yml body check on all PRs

reproduction

  • Steps: 1) Open a PR with a non-compliant body, so the check fails. 2) Edit the body to comply. 3) Re-run the failed job.
  • Expected vs Actual: Expected re-run passes against the edited body; actual re-run fails because the script reads context.payload.pull_request.body, and reruns reuse the original event payload. Body edits also never trigger the workflow (no edited type), forcing an empty push to re-verify.

root cause

fix summary

  • Fetch the live body via github.rest.pulls.get with payload fallback and warning; added edited to pull_request trigger types.

verification

  • Workflow YAML parses cleanly
  • Check logic simulated in node: stale body fails, live body passes, mixed-case headings match (comparison is case-insensitive both sides)
  • Only one payload-body read in the workflow, now the fallback path

risk & rollback

  • Risk level: Low
  • Rollback plan: revert this commit

changelog

Fixed

  • PR template check now verifies the live PR body instead of the stale event snapshot, and body edits retrigger verification.

Checklist (Global DoD / PR)

  • All AC met and demonstrated
  • Tests added/updated (unit/E2E as appropriate)
  • Accessibility checklist completed (where relevant): N/A - CI workflow change, no UI
  • Docs/readme/changelog updated (if user-facing)
  • Security checklist completed (where relevant): N/A - read-only API call, no secrets or privileged actions
  • Code/design reviews approved
  • CI green; linked issues closed; release notes prepared (if shipping)

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: lightspeedwp/.github/.coderabbit.yml

Review profile: CHILL

Plan: Advanced

Run ID: 486a95b1-1b79-49c5-b156-c47658b53600

📥 Commits

Reviewing files that changed from the base of the PR and between 26c6d00 and b6ac8e7.

📒 Files selected for processing (2)
  • .github/workflows/pr-template-routing.yml
  • CHANGELOG.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

📋 Changelog Quality Validation

Summary

Metric Count
✅ Passing 74
⚠️ Warnings 0
❌ Failing 0
🆕 New failures in this PR 0
📦 Pre-existing failures 0

Status

✅ Validation PASSED - No new failures introduced by this PR.

No action required.

@github-actions

Copy link
Copy Markdown
Contributor

PR Template Routing

Branch Type: fix
Scope: pr-template-fresh-body
Template: pr_bug.md
Labels Applied: type:bug

This PR was automatically routed based on the branch naming strategy.

@mergify

mergify Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@eleshar
eleshar merged commit 460fe8c into develop Sep 22, 2026
21 checks passed
@eleshar
eleshar deleted the fix/pr-template-fresh-body branch September 22, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant