PullRequest() public static method

Returns the Uri that returns the specified pull request.
public static PullRequest ( long repositoryId, int number ) : Uri
repositoryId long The Id of the repository
number int The pull request number
return System.Uri
コード例 #1
0
        /// <summary>
        /// Get a pull request by number.
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/pulls/#get-a-single-pull-request
        /// </remarks>
        /// <returns>A <see cref="PullRequest"/> result</returns>
        public Task <PullRequest> Get(string owner, string name, int number)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return(ApiConnection.Get <PullRequest>(ApiUrls.PullRequest(owner, name, number)));
        }
コード例 #2
0
        public Task <PullRequest> Get(string owner, string name, int number)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));

            return(ApiConnection.Get <PullRequest>(ApiUrls.PullRequest(owner, name, number), null, AcceptHeaders.DraftPullRequestApiPreview));
        }
コード例 #3
0
        public Task <PullRequest> Update(string owner, string name, int number, PullRequestUpdate pullRequestUpdate)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNull(pullRequestUpdate, nameof(pullRequestUpdate));

            return(ApiConnection.Patch <PullRequest>(ApiUrls.PullRequest(owner, name, number), pullRequestUpdate, AcceptHeaders.DraftPullRequestApiPreview));
        }
コード例 #4
0
        /// <summary>
        /// Create a pull request for the specified repository.
        /// </summary>
        /// <remarks>http://developer.github.com/v3/pulls/#update-a-pull-request</remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="number">The PullRequest number</param>
        /// <param name="pullRequestUpdate">An <see cref="PullRequestUpdate"/> instance describing the changes to make to the PullRequest
        /// </param>
        /// <returns>An updated <see cref="PullRequest"/> result</returns>
        public Task <PullRequest> Update(string owner, string name, int number, PullRequestUpdate pullRequestUpdate)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(pullRequestUpdate, "pullRequestUpdate");

            return(ApiConnection.Patch <PullRequest>(ApiUrls.PullRequest(owner, name, number), pullRequestUpdate));
        }
コード例 #5
0
 public Task <PullRequest> Get(long repositoryId, int number)
 {
     return(ApiConnection.Get <PullRequest>(ApiUrls.PullRequest(repositoryId, number), null, AcceptHeaders.DraftPullRequestApiPreview));
 }
コード例 #6
0
        public Task <PullRequest> Update(long repositoryId, int number, PullRequestUpdate pullRequestUpdate)
        {
            Ensure.ArgumentNotNull(pullRequestUpdate, nameof(pullRequestUpdate));

            return(ApiConnection.Patch <PullRequest>(ApiUrls.PullRequest(repositoryId, number), pullRequestUpdate, AcceptHeaders.DraftPullRequestApiPreview));
        }
コード例 #7
0
 /// <summary>
 /// Get a pull request by number.
 /// </summary>
 /// <remarks>
 /// http://developer.github.com/v3/pulls/#get-a-single-pull-request
 /// </remarks>
 public Task <PullRequest> Get(long repositoryId, int number)
 {
     return(ApiConnection.Get <PullRequest>(ApiUrls.PullRequest(repositoryId, number)));
 }
コード例 #8
0
        /// <summary>
        /// Create a pull request for the specified repository.
        /// </summary>
        /// <remarks>http://developer.github.com/v3/pulls/#update-a-pull-request</remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="number">The PullRequest number</param>
        /// <param name="pullRequestUpdate">An <see cref="PullRequestUpdate"/> instance describing the changes to make to the PullRequest
        /// </param>
        public Task <PullRequest> Update(long repositoryId, int number, PullRequestUpdate pullRequestUpdate)
        {
            Ensure.ArgumentNotNull(pullRequestUpdate, "pullRequestUpdate");

            return(ApiConnection.Patch <PullRequest>(ApiUrls.PullRequest(repositoryId, number), pullRequestUpdate));
        }