Skip to content

fix(release): only create missing labels during label sync - #715

Merged
goosewobbler merged 2 commits into
mainfrom
fix/label-sync-existing
Oct 23, 2026
Merged

goosewobbler merged 2 commits into
mainfrom
fix/label-sync-existing

Conversation

@goosewobbler

@goosewobbler goosewobbler commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Description

  • standing-pr update (and releasekit labels sync) sent a create request for every ReleaseKit label and relied on GitHub's 422 "already exists" to skip the ones present. Octokit logs each of those as a failed request, so every CI run printed a dozen 422 lines.
  • Label sync now lists the repo's labels once (paginated) and creates only the missing ones. Names match case-insensitively, as on GitHub.
  • A 422 from another run creating a label after the listing is still treated as "already exists".

Related Issue(s)

None; seen in #614's label-triggered run.

Type of Change

  • feat — New feature
  • fix — Bug fix
  • docs — Documentation change
  • refactor — Code refactoring
  • test — Adding or updating tests
  • chore — Maintenance, dependencies, tooling
  • Breaking change — Requires major version bump

Scope

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release
  • @releasekit/config
  • @releasekit/core
  • CI / workflows
  • Root / monorepo

Checklist

  • Lint passes (pnpm lint)
  • Tests pass (pnpm test)
  • Typecheck passes (pnpm typecheck)
  • Documentation updated (if applicable)
  • Breaking changes noted in description

Testing Notes

  • New tests: labels the repo already has get no create request (through runStandingPRUpdate, runLabelsSync and syncLabels); case-insensitive matching; a single listing; the 422 race; and the forge's listLabelNames following every page.
  • All the new tests except the 422-race one fail against the previous syncLabels. The race test passes on both, since the old code already tolerated it.
  • Full gate (lint, typecheck, tests) passes.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; the previous duplicate-create issue is fixed.

Summary

Label sync lists repository labels once and creates only missing labels, ignoring case.

  • Label sync skips repository labels it already has.

Reviews (2) · Last reviewed commit: "fix(release): track labels created durin..." · Reviewed by Greptile

syncLabels sent a create request for every config-implied label and relied
on GitHub's "already exists" 422 to skip present ones. Octokit logs each of
those requests, so every standing-PR update printed a dozen 422 lines that
read like failures.

List the repo's labels once (paginated), match names case-insensitively,
and only request the missing ones. A 422 from a concurrent run that creates
a label after the listing is still treated as existing. Applies to both
standing-pr update and labels sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Standing release PR: #614 · v0.42.0 queued (4 packages) · open 82d 22h 5m · ✅ ready to merge

Release Preview — v0.41.2 → v0.41.3

Note: Labels on this PR are advisory in standing-pr mode. Bumps come from conventional commits in the standing PR; override by editing labels on the standing PR itself. Add release:immediate to bypass the standing PR and release this PR directly.

These changes will be added to the release PR (#614) when merged:

Changelog

monorepo 0.41.2 → 0.41.3

Changed

  • let the standing-PR update post its commit status (PR #714)

Fixed

  • track labels created during the sync (release)
  • only create missing labels during label sync (release)

All packages → 0.41.3 (sync versioning)

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release

After merge — predicted release

No version escalation — this PR's changes will be included in the queued release without affecting the projected versions.

Package Standing PR This PR After merge
monorepo 0.42.0 0.41.3 0.42.0

Updated automatically by ReleaseKit

Comment thread packages/release/src/label-definitions.ts
Definitions can differ only in case (`bump:minor` and `Bump:Minor`), so
a label created earlier in the loop must count as existing for the rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@goosewobbler
goosewobbler merged commit 0ab033f into main Oct 23, 2026
34 checks passed
@goosewobbler
goosewobbler deleted the fix/label-sync-existing branch October 23, 2026 16:24
@github-actions github-actions Bot mentioned this pull request Oct 23, 2026
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