Skip to content

Fix uninterpolated ${PR_ID} in collections-renames autofix branch name#5157

Merged
kenyonj merged 1 commit intomainfrom
kenyonj/fix-collections-renames-branch-name
May 7, 2026
Merged

Fix uninterpolated ${PR_ID} in collections-renames autofix branch name#5157
kenyonj merged 1 commit intomainfrom
kenyonj/fix-collections-renames-branch-name

Conversation

@kenyonj
Copy link
Copy Markdown
Contributor

@kenyonj kenyonj commented May 7, 2026

Summary

The branch: input to peter-evans/create-pull-request in .github/workflows/collections-renames.yml was set to update-collections-${PR_ID}, but:

  1. Actions inputs are not shell-interpolated.
  2. No PR_ID env var is defined anywhere in the workflow.

So the literal string ${PR_ID} was ending up in the branch name. You can see this on the existing autofix PR — e.g. #5152 reports force-pushed the update-collections-${PR_ID} branch.

Fix

Drop the suffix. peter-evans/create-pull-request is designed around a stable branch: if a PR already exists for that branch, it force-pushes new changes onto it instead of opening a new one. That matches what we want for an hourly autofix job — one rolling open PR, not a new branch every hour.

Test plan

  • Next scheduled run uses the branch update-collections and updates the existing autofix PR (or opens one if none is open).
  • No more ${PR_ID} literals in branch names.

The `branch:` input to peter-evans/create-pull-request was set to
`update-collections-${PR_ID}`, but Actions inputs aren't shell-
interpolated and no `PR_ID` env var is defined — so the literal
string `${PR_ID}` was ending up in the branch name (e.g.
`update-collections-${PR_ID}`).

peter-evans/create-pull-request is designed to reuse a stable
branch: if an open PR already exists for that branch, it
force-pushes new changes onto it instead of opening a new one.
That's the desired behavior for an hourly autofix job — one
rolling PR, not a new branch each hour.

Drop the suffix entirely.
Copilot AI review requested due to automatic review settings May 7, 2026 18:33
@kenyonj kenyonj requested a review from a team as a code owner May 7, 2026 18:33
@kenyonj kenyonj merged commit 81fb30a into main May 7, 2026
13 checks passed
@kenyonj kenyonj deleted the kenyonj/fix-collections-renames-branch-name branch May 7, 2026 18:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the collections renames autofix workflow to use a stable branch name for peter-evans/create-pull-request, avoiding the literal ${PR_ID} suffix that was never interpolated.

Changes:

  • Update .github/workflows/collections-renames.yml to set branch: update-collections instead of update-collections-${PR_ID}.
Show a summary per file
File Description
.github/workflows/collections-renames.yml Ensures the autofix workflow uses a stable branch name so subsequent runs update the same PR/branch.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@ahpook
Copy link
Copy Markdown
Contributor

ahpook commented May 7, 2026

Nice, I'd seen this problem but hadn't dug in to fix it - thanks @kenyonj !

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