Choose a specific organization-owned fork as the pull request head
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- cli, developer-experience
Hướng nghiên cứu
The change involves the gh pr create command. Start by examining the command's argument parsing and the logic for resolving the head repository in the codebase, likely in the pkg/cmd/pr/create directory. Look for existing handling of the --head flag and how it interacts with forks. The feature requires understanding GitHub's API for creating pull requests and how to specify a repository-qualified head. Testing will involve verifying the new syntax works correctly and that the --web flag error is properly implemented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the feature or problem you’d like to solve
An organization can own more than one fork that could supply a pull request branch. An organization and branch alone are therefore not always enough to identify the contributor’s intended head repository.
As a contributor working in an organization with multiple forks, I want to identify the exact head repository, so that the pull request is created from the fork I intended.
Proposed solution
Allow gh pr create --head ORGANIZATION/REPOSITORY:BRANCH to identify the exact organization-owned head repository.
Feature: Choose a specific organization-owned fork as the pull request head
Scenario: The selected fork belongs to another organization
Given the base repository is "org/upstream"
And "other-org/upstream-fork" is a fork of the base repository
When the contributor runs `gh pr create --head other-org/upstream-fork:feature-branch`
Then a pull request is created from "other-org/upstream-fork:feature-branch"
And the pull request targets "org/upstream"
Scenario: The selected fork belongs to the same organization as the base repository
Given the base repository is "org/upstream"
And "org/upstream-fork" is a fork of the base repository
When the contributor runs `gh pr create --head org/upstream-fork:feature-branch`
Then a pull request is created from "org/upstream-fork:feature-branch"
And the pull request targets "org/upstream"
Scenario: The organization owns multiple candidate forks
Given the base repository is "org/upstream"
And "org/upstream-fork" is a fork of the base repository
And "org/experimental-upstream-fork" is a fork of the base repository
When the contributor runs `gh pr create --head org/upstream-fork:feature-branch`
Then a pull request is created from "org/upstream-fork:feature-branch"
And the pull request targets "org/upstream"
Scenario: Repository-qualified head is combined with web mode
When the contributor runs `gh pr create --head other-org/upstream-fork:feature-branch --web`
Then the command fails before opening a browser
And the error explains that a repository-qualified `--head` cannot be used with `--web`
And the error tells the contributor to omit `--web` or select the fork on GitHub
Additional context
This is a sub-issue of #10093.
This issue introduces the repository-qualified ORGANIZATION/REPOSITORY:BRANCH form. The --web behavior may be refined if GitHub’s web pull-request flow can identify the exact head repository.
- Ngôn ngữ chính
- Go
- Star
- 46.3k
- Fork
- 9.1k
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 76
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cli/cli
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
more-info-needed needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
bug gh-pr priority-2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
bug gh-pr priority-2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
bug gh-auth priority-3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Issue tương tự
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
microsoft/agent-framework-go#1179 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
[Bug]: OLLAMA_KEEP_ALIVE="5m" / "24h" crashes Ollama embedding and vision models with ValueError Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
infiniflow/ragflow#20223 · 1 reaction ·
-
bug needs triage pkg/translator/faro
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
open-telemetry/opentelemetry-collector-contrib#51484 · 1 bình luận ·