Skip to content

ci: more flexible pr template handling#1082

Merged
psschwei merged 2 commits into
generative-computing:mainfrom
psschwei:fix-pr-bodies
May 15, 2026
Merged

ci: more flexible pr template handling#1082
psschwei merged 2 commits into
generative-computing:mainfrom
psschwei:fix-pr-bodies

Conversation

@psschwei
Copy link
Copy Markdown
Member

@psschwei psschwei commented May 15, 2026

Misc PR

Type of PR

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Description

The PR Bot workflow currently overwrites the entire PR body when it fires, which means contributors who write a meaningful description upfront lose their text, and contributors who skip the checkbox dance break CI. This change shifts the primary path from "edit body, wait for bot, then write details" to "pick a template at PR creation time, write details once."

What changed

  • Template picker in pull_request_template.md: replaced the checkbox list with direct links to each per-type template. Clicking a link reloads the new-PR page with the right checklist pre-filled, so users only fill out one form.
  • Per-type templates carry a marker: each template in .github/PULL_REQUEST_TEMPLATE/ now starts with a hidden marker comment that signals "checklist already present."
  • Workflow is now additive, not destructive: the bot only runs when the marker is absent, appends the checklist below a --- divider instead of overwriting, and preserves the user's original text verbatim above it.
  • No more CI failures from missing checkboxes: if no type is detected, the bot falls back to the misc template instead of erroring.
  • Trigger narrowed to opened: the workflow no longer re-fires when users edit their body, eliminating a class of redundant runs.

Net effect on contributors

  • Users who pick a template at creation time: write their description once, never see the bot.
  • Users who skip the picker: their text is preserved; the bot quietly appends a checklist below.
  • Users who used to break CI by editing too quickly: no longer break CI.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code as added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com>
@psschwei psschwei requested a review from a team as a code owner May 15, 2026 13:49
@psschwei psschwei requested review from markstur and planetf1 May 15, 2026 13:49
@github-actions
Copy link
Copy Markdown
Contributor

The PR description has been updated. Please fill out the template for your PR to be reviewed.

Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com>
Copy link
Copy Markdown
Contributor

@markstur markstur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

definitely looks like a step in the right direction!

Copy link
Copy Markdown
Contributor

@ajbozarth ajbozarth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, but I can't test until it merges

@psschwei psschwei added this pull request to the merge queue May 15, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 15, 2026
@psschwei psschwei added this pull request to the merge queue May 15, 2026
Merged via the queue into generative-computing:main with commit 0d99b1b May 15, 2026
6 checks passed
@psschwei psschwei deleted the fix-pr-bodies branch May 15, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants