cli / cli/cli

`pr fetch` command

Đang mở
#9,533 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
enhancement needs-triage
Ngôn ngữ chính
Go
Star
46.3k
Fork
9k
Merge trung bình
2 ngày 6 giờ
Pull request đã merge (30 ngày)
97

Mô tả

### Fetching pull requests without checking them out

Usually I work with development branches and merge pull requests directly to them for testing. Most of the time, it is not necessary to actually check out the branch into a work tree, I can just merge it directly. However the GitHub CLI tool always checks out the branch.

### Proposed solution

[It is possible][1] to do this manually:

```shell
git fetch origin pull/PR-NUMBER/head:BRANCH-NAME
```

It is very annoying though since I need to look up the user and branch name and name the branch myself. It would be far more convenient to be able to run something like:

```shell
gh pr fetch PR-NUMBER
```

To simply fetch the `PR-NUMBER` pull request into a local branch in the `-` format.

[1]: https://stackoverflow.com/a/30584951

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

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

Hướng nghiên cứu

Bắt đầu bằng cách theo dõi lệnh `gh pr` hiện có và hành vi checkout của nó, sau đó so sánh với quy trình đã được ghi lại `git fetch origin pull/PR-NUMBER/head:BRANCH-NAME`. Hoàn thành khi `gh pr fetch PR-NUMBER` fetch pull request vào một branch cục bộ `-` mà không checkout branch đó.

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

Đánh giá

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

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.