Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

enable linking branch via mcp

Đang mở
#2,720 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
github, go
Lĩnh vực
api, tooling

Hướng nghiên cứu

Bắt đầu từ công cụ create_branch hiện có và cách xử lý request của nó, sau đó so sánh các tham số hiện tại với endpoint POST /repos/{owner}/{repo}/issues/{issue_number}/branches của GitHub. Công việc được xem là hoàn tất khi create_branch có thể nhận issue_number tùy chọn, tạo branch được liên kết khi tham số này được cung cấp và giữ nguyên hành vi hiện tại khi tham số này bị bỏ qua.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement request ai review

###Describe the feature or problem you'd like to solve

When working with GitHub issues in an agentic workflow, creating a branch that is properly linked to an issue via the Development section requires either the GraphQL createLinkedBranch mutation or the REST endpoint POST /repos/{owner}/{repo}/issues/{issue_number}/branches. The current create_branch tool only accepts branch, from_branch, owner, and repo — with no way to associate the branch with an issue.

As a result, branches created by AI agents appear unlinked in the GitHub UI, breaking the issue → branch → PR traceability chain that teams rely on for project tracking.

Proposed solution

Add an optional issue_number parameter to the existing create_branch tool (or expose a new create_linked_branch tool) that calls POST /repos/{owner}/{repo}/issues/{issue_number}/branches. When provided, the created branch automatically appears in the issue's Development section, closing the gap in the issue lifecycle.

This mirrors the behavior of gh issue develop #N --branch-name my-branch in the GitHub CLI.

Example prompts or workflows (for tools/toolsets only)

Agentic development loop — "Fix issue #42" → agent creates issue, calls create_branch with issue_number: 42, pushes commits, opens PR with Closes #42. The full issue lifecycle is traceable in the GitHub UI without any manual steps.

Project board automation — Teams using GitHub Projects can see the branch linked directly on the issue card, giving PMs visibility into which issues are actively being worked on before the PR is opened.

Multi-agent workflows — A planning agent creates the issue and the linked branch, then hands off to a coding agent. The Development section link makes it unambiguous which branch belongs to which issue across agents.

QA-to-dev handoff — A QA agent files a bug report (issue), a dev agent immediately creates a linked branch. The Development link is visible to the QA agent when it checks the issue status later to verify the fix.

Additional context
The GitHub REST API already supports this via POST /repos/{owner}/{repo}/issues/{issue_number}/branches (documented at https://docs.github.com/en/rest/issues/issues#create-a-branch-for-an-issue). This is a thin wrapper — no new authentication scope is required beyond what create_branch already uses. The only addition needed is passing issue_number in the request body.

Ngôn ngữ chính
Go
Star
33.1k
Fork
5k
Merge trung bình
2 ngày 1 giờ
Pull request đã merge (30 ngày)
25

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/github-mcp-server

Tất cả issue của github/github-mcp-server

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.