Skip to content

Improve pre-created pull request title and body - #53956

Merged
pelikhan merged 8 commits into
mainfrom
copilot/safe-outputs-update-feature
Aug 19, 2026
Merged

Improve pre-created pull request title and body#53956
pelikhan merged 8 commits into
mainfrom
copilot/safe-outputs-update-feature

Conversation

CopilotAI commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

The draft PR allocated by safe-outputs.create-pull-request.pre-create used the title [<workflow>] Work in progress, ignored the configured title-prefix, and had a one-line body that did not convey the PR's in-progress state or that steering the running agent is unsupported.

Title

  • Starts with [WIP], then the configured title-prefix (applied via applyTitlePrefix, so spacing/duplication rules match other safe outputs), then text containing the workflow name.
[WIP] [bot] Daily Go Test Parallelizer: work in progress

Compiler

  • addActivationPreCreatePullRequestStep emits GH_AW_PR_TITLE_PREFIX from create-pull-request.title-prefix; the env var is omitted when unset.

Body

  • States the PR is a work in progress and currently contains no changes, links the workflow run, notes the title/body/commits are updated on completion and that changeless runs are closed automatically, and calls out that steering via comments or reviews is not supported yet.

Docs & tests

  • Reference docs for pre-created pull requests describe the new title shape and body content.
  • Go tests cover prefix propagation (set and unset); pre_create_pull_request.test.cjs covers the WIP marker, prefix placement, and body content. Workflow lock files recompiled.

Generated by PR Sous Chef run https://github.com/github/gh-aw/actions/runs/32249206937> Generated by 👨‍🍳 PR Sous Chef · gpt54 · 23.7 AIC · ⌖ 8.26 AIC · ⊞ 9.3K ·

Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 10.8 AIC · ⌖ 8.39 AIC · ⊞ 9.3K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI requested a review from pelikhanAugust 19, 2026 10:17
@pelikhan
pelikhan marked this pull request as ready for review August 19, 2026 10:23
CopilotAI balanced review requested due to automatic review settings August 19, 2026 10:23
Comment threadactions/setup/js/pre_create_pull_request.cjs Outdated

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Improves pre-created draft PR titles and bodies to communicate work-in-progress status and apply configured title prefixes.

Changes:

  • Propagates and applies title-prefix after [WIP].
  • Expands the placeholder PR body and documentation.
  • Adds compiler and JavaScript tests and recompiles the affected workflow.
Show a summary per file
FileDescription
pkg/workflow/compiler_precreate_pull_request.goExports the configured title prefix.
pkg/workflow/compiler_precreate_pull_request_test.goTests prefix propagation and omission.
docs/src/content/docs/reference/safe-outputs-pull-requests.mdDocuments the new placeholder content.
actions/setup/js/pre_create_pull_request.test.cjsTests title and body behavior.
actions/setup/js/pre_create_pull_request.cjsBuilds the new title and body.
.github/workflows/daily-go-test-parallelizer.lock.ymlIncludes the recompiled prefix environment variable.

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Balanced

let checkRun;
const titlePrefix = process.env.GH_AW_PR_TITLE_PREFIX || "";
// "[WIP]" first so the in-progress state is visible even when a title prefix is configured.
const title = `[WIP] ${applyTitlePrefix(`${workflowName}: work in progress`, titlePrefix)}`;
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please address the remaining maintainer-visible blockers on this PR in one pass.

  • There is still maintainer-visible review activity on the current branch; please reply on the current head with the final resolution summary for the title/body behavior and any validation you re-ran.
  • Please refresh the branch if needed.
  • Then run the pr-finisher skill before handing back for maintainer review.

Generated by 👨🍳 PR Sous Chef

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 23.7 AIC · ⌖ 8.26 AIC · ⊞ 9.3K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

CopilotAI commented Aug 19, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot Please address the remaining maintainer-visible blockers on this PR in one pass.

  • There is still maintainer-visible review activity on the current branch; please reply on the current head w...

Final resolution on current head 1b6b353c52:

  • Title behavior: pre-created PR titles start with [WIP], then apply the configured title-prefix via applyTitlePrefix, followed by the workflow-specific work-in-progress text.
  • Body behavior: the pre-created PR body now comes from actions/setup/md/pre_created_pull_request_body.md and is rendered with renderTemplateFromFile; it links the workflow run, states the PR is still in progress/no changes yet, explains completion/changeless-run behavior, and notes steering by PR comments/reviews is unsupported.
  • Branch refresh: current branch includes latest main via merge commit f29ee31f1f.
  • Validation rerun: make agent-report-progress, make test, make lint-cjs, focused pre_create_pull_request.test.cjs, focused eslint-factory rule test, automated code review, CodeQL JavaScript scan, and secret scan all passed.
  • CI triage: current-head CJS failure was root-caused to formatting in eslint-factory/src/rules/no-exec-interpolated-command.test.ts and fixed in 1b6b353c52; current-head CGO failure had no individual test failure and ended with error generating coverage report: write |1: file already closed, so it appears infra/coverage-output related and was not reproduced locally (make test passed).

@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: chore
  • Risk: low
  • Priority score: 48/100 (impact 20 + urgency 10 + quality 18)
  • Recommended action: auto_merge

Improves pre-created PR title/body UX for safe-outputs create-pull-request pre-create flow. No test/CI risk observed; straightforward text change.

Generated by 🔧 PR Triage Agent · auto · 44.3 AIC · ⌖ 2.78 AIC · ⊞ 8.3K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please address the remaining unresolved review feedback, refresh the branch if GitHub offers one, and then run the pr-finisher skill.

Open review threads (newest first):

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 10.8 AIC · ⌖ 8.39 AIC · ⊞ 9.3K ·
Comment /souschef to run again

CopilotAIand others added 3 commits August 19, 2026 13:49
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

CopilotAI commented Aug 19, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot Please address the remaining unresolved review feedback, refresh the branch if GitHub offers one, and then run the pr-finisher skill.

Open review threads (newest first):...

Resolved on current head f9327bf2ac.

  • Title feedback: actions/setup/js/pre_create_pull_request.cjs now sanitizes the prefix/workflow title text and truncates it to the remaining GitHub title budget before prepending the invariant [WIP] marker, so the final pre-created PR title cannot exceed 256 characters while preserving [WIP].
  • Tests: added coverage for long workflow names/title prefixes producing a 256-character PR title, no truncation notice in the title, mention sanitization in the assembled title, and the default sanitizeTitle 128-character limit.
  • Body feedback: already addressed by actions/setup/md/pre_created_pull_request_body.md rendered through renderTemplateFromFile; MCP reports that review thread is resolved.
  • Branch/CI: branch is refreshed on current base; MCP reports no status contexts/check runs on the pushed agent head, so CI needs a maintainer re-trigger.
  • Validation rerun: focused CJS tests (pre_create_pull_request.test.cjs, sanitize_title.test.cjs) passed; make agent-report-progress passed on latest head; secret scan passed; automated code review rerun; CodeQL reported no analyzable supported-language changes.

@pelikhan
pelikhan merged commit 38ecc99 into mainAug 19, 2026
@pelikhan
pelikhan deleted the copilot/safe-outputs-update-feature branch August 19, 2026 14:44
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.2

Sign up for freeto 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.

4 participants

@gh-aw-bot@pelikhan