feat: add delete_branch tool to repos toolset - #3
Merged
Conversation
Wraps octokit's git.deleteRef to delete a branch by name, mirroring the create_branch tool's conventions. Returns a synthetic deleted:true result since the API responds with 204 No Content.
Prevents false positives like Ffeature/Fmissing from URL-encoded branch refs (%2F) in test fixtures.
Transitive esbuild versions from tsup/tsx/vite resolved to 0.27.7, which is within the vulnerable range for GHSA-g7r4-m6w7-qqqr (arbitrary file read via dev server on Windows). npm audit fix couldn't bump it automatically since each parent's semver range caps below 0.28.1, so an override was needed.
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.
Summary
delete_branchwrite tool to therepostoolset, wrapping octokit'sgit.deleteRefto delete a branch by name (mirrors the existingcreate_branchtool's conventions).{ deleted: true }result, matching thedelete_gistpattern, since the underlying API returns 204 No Content.Test plan
test/unit/toolsets/repos.test.ts: happy path (204 →{deleted: true}), 404 error propagation, and read-only/read-write permission gating.npm test— 228/228 unit tests pass.npm run typecheck— clean.npm run lint— clean.create_repo/delete_repotools yet to provision a disposable one safely.