Repository navigation
fix(release): resolve the release base branch instead of hardcoding master - #193
Merged
Merged
Conversation
…aster main-default repos (no `master` branch) couldn't cut a release: the next/hotfixes release workflows failed at `git fetch origin master`, so the persistent `next → <default>` release PR was never created (CLDMV/polyfillme, CLDMV/cpm). Add a dedicated `git/utilities/resolve-release-base` action that resolves the base in priority order: the `CLDMV_RELEASE_BASE` Actions variable → the reusable workflow's `default_branch` input → the API `repository.default_branch` → `master`. Thread it through the release path: - workflow-next-release.yml / workflow-hotfixes-release.yml resolve once in the plan job and use it for fetch / rev-list / `gh pr list --base`, passing it to create/update-release-pr. - create-release-pr / update-release-pr fetch the resolved base and feed it to divergence.mjs / find-divergence (which use it when set, else keep the master→main heuristic) and to the changelog's release-PR filter. - pending-release-reminder queries the resolved base instead of `master`. Backward compatible: master-default repos resolve to `master` and every step behaves exactly as before. New action ships via @v4. Known follow-ups (non-blocking): the `! release → master` flow label stays a fixed marker (changing it risks label-keyed release-PR detection); the reminder honors the var + API default but not a yaml-input-only base config. Fixes #192
The `! release → <base>` / `! hotfix release → <base>` flow labels were still hardcoded to `master`, so a main-default repo's release PR was mislabeled "→ master" even though its base was correct. Derive the base from the same resolved value as the PR's base branch so the label reflects the actual target. The managed-labels allowlist now includes the master/main (and, when custom, the resolved-base) flow-label variants so a stale lane label prunes across a default-branch change — and update-release-pr re-derives the label on every refresh, so the no-var + default-changed case self-heals. Added the `! release → main` / `! hotfix release → main` entries to data/github-labels.json so they're defined + styled rather than auto-created gray.
Shinrai
previously approved these changes
Aug 3, 2026
…eQL) The #192 change interpolated the resolved DEFAULT_BRANCH into the git command STRING passed to tryGit → execSync (a shell), which CodeQL flags as js/indirect-command-line-injection (the two alerts blocking PR #193). The base is repo config (a variable / workflow input / API default_branch), never PR content, so it is effectively a false positive — but the correct, gate-clearing fix is real: add an argv-based tryGitArgs (execFileSync, no shell) and route the base-interpolated merge-base + `git show <base>:package.json` calls through it. The literal master/main heuristic calls stay on the shell path unchanged.
Shinrai
approved these changes
Aug 3, 2026
Shinrai
added a commit
that referenced
this pull request
Aug 3, 2026
…elease opener resolve-release-base (added in #193) isn't on the @v4 tag yet, and .github runs its own release from next's copy of workflow-next-release.yml, which referenced the action @v4 — so the Plan job failed at action-download and no release PR opened. Pin the resolver step in both release workflows to a next commit that has the action; a follow-up flips the pin back to @v4 once it ships to the tag.
This was referenced Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
No other changes
👥 Contributors