feat: link existing GitHub branches to tasks (POST /branches/link) - #17
Closed
Anshulgada wants to merge 3 commits into
Closed
feat: link existing GitHub branches to tasks (POST /branches/link)#17Anshulgada wants to merge 3 commits into
Anshulgada wants to merge 3 commits into
Conversation
…ith tasks Mirrors pull-requests/link: verifies the branch ref on GitHub, inserts into github_task_branches, and exposes github_link_branch_to_task MCP tool. Fixes linking IDE-created branches without calling GitHub create (Reference already exists). Closes Paca-AI#16.
Branch names like fix/foo were split into extra path segments when
building GET .../git/ref/heads/{branch}, causing fetch failures that
looked like domain allowlist errors. Encode owner, repo, and branch
ref segments with url.PathEscape.
Adds unit tests for ghBranchHeadRefURL and link-route validation.
Author
Update: branch names with
|
Replace org-internal repo/branch names in URL tests with public projects (torvalds/linux, golang/go, etc.). Add table-driven slash encoding cases. Add link/create branch 400-path validation tests.
Anshulgada
force-pushed
the
feat/link-existing-branch
branch
from
July 31, 2026 06:13
c34a513 to
8395594
Compare
Author
|
Superseded by a clean single-commit PR with the same feature (no messy commit history). |
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
Adds a link-only branch endpoint mirroring
POST .../pull-requests/link.POST /projects/:projectId/tasks/:taskId/branches/link— verify branch exists on GitHub, insert intogithub_task_branches(supports one branch → many tasks)github_link_branch_to_taskMCP toolbranchExists()before linkingFixes IDE/agent workflows where the branch already exists and
POST /branchesfails withReference already exists.Closes #16
Test plan
go test ./...inbackend/