Skip to content

fix: validate access before publishing library bump branches - #76

Merged
juan-fernandez merged 2 commits into
mainfrom
juan-fernandez/fix-library-bump-labels
Oct 15, 2026
Merged

juan-fernandez merged 2 commits into
mainfrom
juan-fernandez/fix-library-bump-labels

Conversation

@juan-fernandez

@juan-fernandez juan-fernandez commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

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 gh setup. 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.sh and git diff --check pass.
  • Live scripts/create-library-version-bump-pr.sh --dry-run reports the expected seven dependency updates and creates no refs, labels, commits, or PR.
  • Verified that the repository-aware gh selects an account with write access while a different account is active in the stock CLI.

@juan-fernandez
juan-fernandez requested a review from a team as a code owner October 15, 2026 08:32

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

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.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 296e1e7

@juan-fernandez
juan-fernandez merged commit a6ab989 into main Oct 15, 2026
12 checks passed
@juan-fernandez
juan-fernandez deleted the juan-fernandez/fix-library-bump-labels branch October 15, 2026 08:46
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.

2 participants