Skip to content

fix(cd): create 'automated' label before back-merge PR to avoid failure#300

Open
pszymkowiak wants to merge 1 commit into
developfrom
fix/back-merge-label
Open

fix(cd): create 'automated' label before back-merge PR to avoid failure#300
pszymkowiak wants to merge 1 commit into
developfrom
fix/back-merge-label

Conversation

@pszymkowiak

Copy link
Copy Markdown
Contributor

Problem

The post-release back-merge-develop job in cd.yml runs gh pr create … --label automated, but the automated label does not exist in this repo. gh pr create validates labels before creating the PR, so the step fails with:

could not add label: 'automated' not found

This happened on every release: the back-merge branch was pushed but no PR was opened, so develop silently fell behind on release-version metadata (manifest + CHANGELOG + Cargo.toml). Observed and recovered manually on icm-v0.10.54 (back-merge completed via #298).

Fix

Create the automated label idempotently right before gh pr create:

gh label create automated --color ededed --description "Automated PR (back-merge / release tooling)" 2>/dev/null || true
  • Keeps the automated label semantics (useful for filtering tooling PRs).
  • Removes the failure mode without masking real gh pr create errors.

Test

YAML validated. Functional validation happens on the next release: the back-merge PR should open automatically with the automated label and no failure.

The post-release back-merge job runs `gh pr create --label automated`, but
the label does not exist in the repo. `gh pr create` validates labels before
creating the PR, so the whole step failed ("could not add label: 'automated'
not found") on every release — the back-merge branch was pushed but no PR was
opened, leaving develop behind on version metadata.

Create the label idempotently right before the PR is opened. Keeps the
`automated` label semantics (useful for filtering tooling PRs) while removing
the failure mode; real `gh pr create` errors still surface.

Observed on the icm-v0.10.54 release.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant