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

Add auto-merge support to pull request tools

Đang mở
#2,411 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, graphql
Lĩnh vực
api, backend, tooling

Hướng nghiên cứu

Start at the existing merge_pull_request tool and compare its pull request inputs with the GitHub GraphQL enablePullRequestAutoMerge mutation. Implement the proposed auto-merge operation with owner, repo, pullNumber, and mergeMethod handling; determine from the surrounding pull request tools whether disablePullRequestAutoMerge belongs in scope. Done means MCP clients can enable auto-merge without falling back to the gh CLI.

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

Mô tả

[!Note]
Responses generated with Claude

Describe the feature or problem you'd like to solve

There is no MCP equivalent for enabling auto-merge on a pull request (gh pr merge --auto --squash). This is a common workflow step after CI passes and approvals are in place.

Currently the only way to enable auto-merge via MCP clients is to fall back to gh CLI, which breaks the MCP-first workflow pattern and causes permission prompt friction in tools like Claude Code.

Proposed solution

Add an enable_auto_merge method (or similar) to the pull request write tools. The GitHub GraphQL API exposes the enablePullRequestAutoMerge mutation:

mutation($pullRequestId: ID!, $mergeMethod: PullRequestMergeMethod!) {
  enablePullRequestAutoMerge(input: {
    pullRequestId: $pullRequestId
    mergeMethod: $mergeMethod
  }) {
    pullRequest { autoMergeRequest { enabledAt mergeMethod } }
  }
}

Parameters:

  • owner (required): Repository owner
  • repo (required): Repository name
  • pullNumber (required): PR number
  • mergeMethod (optional): MERGE, SQUASH, or REBASE (default to repo setting)

A corresponding disablePullRequestAutoMerge mutation exists and could be included.

Example prompts or workflows
  1. "Enable auto-merge on PR #123 with squash"
  2. "Once CI passes, auto-merge this PR"
  3. "Set up auto-merge for all my approved PRs"
Additional context

The existing merge_pull_request tool handles immediate merges, but auto-merge is a distinct operation — it queues the merge to happen automatically once all required status checks and approvals are satisfied. This is particularly useful in CI-heavy repos where PRs can't be merged until checks complete.

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.