libgit2 / libgit2/libgit2sharp
Create a Pull Request (git pull) by adding one or more reviewers option?
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C#
- Star
- 3.5k
- Fork
- 925
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I am using .NET 5.0 Using libgit2sharp 0.26.0, I've written code to clone , create a new branch, change some files, commit and push branch to bitbucket.
Now I need to create a pull-request and add a reviewer to it. However, my Google searches don't turn up any relevant info.
Does libgit2sharp support creating PRs by adding reviewer? Any help
using (var repo = new Repository(LocalRepoUrl))
{
Signature Signature = new Signature(Username, Email,
new DateTimeOffset(DateTime.Now.Year,
DateTime.Now.Month, DateTime.Now.Day,
DateTime.Now.Hour,
DateTime.Now.Minute, DateTime.Now.Second,
TimeSpan.FromHours(2)));
FetchOptions fetchOptions = new FetchOptions();
fetchOptions.CredentialsProvider = (_url, _user, _cred) => new UsernamePasswordCredentials
{
Username = Username,
Password = Password
};
MergeOptions mergeOptions = new MergeOptions();
mergeOptions.IgnoreWhitespaceChange = true;
mergeOptions.FailOnConflict = true;
mergeOptions.CommitOnSuccess = true;
mergeOptions.FastForwardStrategy = FastForwardStrategy.Default;
PullOptions pullOptions = new PullOptions();
pullOptions.FetchOptions = fetchOptions;
pullOptions.MergeOptions = mergeOptions;
// how to add reviewer
var mergeResult = Commands.Pull(repo, Signature, pullOptions); // no pull request generated
Please correct me if I am wrong and suggest me with the correct code.
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.
Hướng nghiên cứu
Bắt đầu bằng cách xem xét mối quan hệ giữa Commands.Pull, PullOptions và workflow pull request và reviewer được yêu cầu, được mô tả trong issue. Kiểm tra xem repository có cung cấp entry point cho workflow đó hay không; kết quả cần là câu trả lời rõ ràng về việc workflow này có được hỗ trợ hay không, đồng thời xác định mọi phạm vi cần thiết.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- csharp, git
- Lĩnh vực
- tooling
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 20/100