Repository navigation
fix: validate access before publishing library bump branches - #76
Merged
Merged
Conversation
There was a problem hiding this comment.
More details
Access and label failures stop before branch creation or publishing, and existing label metadata is preserved. The completed static review found no actionable regression; dry-run previews remain available without write access.
🤖 Bits Code Review · Commit 296e1e7
daniel-mohedano
approved these changes
Oct 15, 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 does this PR do?
Checks GitHub API write access before starting a library bump, reuses existing labels, and creates missing labels before creating a branch, committing, or pushing. Documents the credential requirements.
Motivation
A library bump run pushed its signed commit and then failed with HTTP 404 during label creation, leaving a branch without a PR. Detect repository access and label permission failures before publishing a bump branch.
Additional Notes
Account selection is handled by the local
ghsetup. Git SSH authentication and GitHub CLI API authentication can use different accounts. Existing repository label descriptions and colors are preserved. Library defaults are unchanged in this PR.Possible Drawbacks / Trade-offs
Non-dry runs require the API credential to report repository write access. Dry-run previews continue to work with read access.
Describe how to test/QA your changes
bash -n scripts/create-library-version-bump-pr.shandgit diff --checkpass.scripts/create-library-version-bump-pr.sh --dry-runreports the expected seven dependency updates and creates no refs, labels, commits, or PR.ghselects an account with write access while a different account is active in the stock CLI.