Open ajaykumar-hcl opened 1 year ago
git pull
is not the same as creating a pull request. (Docs)
"Pull requests" are no native to git
, they are a concept provided by each individual git provider. GitHub and Bitbucket call them pull requests, GitLab calls them merge requests.
You'll need to use the git providers own API if you want to create a pull request. Here's what I found for Bitbucket: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-post
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 };