PullRequests() публичный статический Метод

Returns the Uri that lists the pull requests for a repository.
public static PullRequests ( long repositoryId ) : Uri
repositoryId long The Id of the repository
Результат System.Uri
Пример #1
0
        public Task <IReadOnlyList <PullRequest> > GetAllForRepository(long repositoryId, PullRequestRequest request, ApiOptions options)
        {
            Ensure.ArgumentNotNull(request, nameof(request));
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <PullRequest>(ApiUrls.PullRequests(repositoryId),
                                                      request.ToParametersDictionary(), AcceptHeaders.DraftPullRequestApiPreview, options));
        }
Пример #2
0
        public Task <PullRequest> Create(string owner, string name, NewPullRequest newPullRequest)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNull(newPullRequest, nameof(newPullRequest));

            return(ApiConnection.Post <PullRequest>(ApiUrls.PullRequests(owner, name), newPullRequest, AcceptHeaders.DraftPullRequestApiPreview));
        }
Пример #3
0
        /// <summary>
        /// Create a pull request for the specified repository.
        /// </summary>
        /// <remarks>http://developer.github.com/v3/pulls/#create-a-pull-request</remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="newPullRequest">A <see cref="NewPullRequest"/> instance describing the new PullRequest to create</param>
        /// <returns>A <see cref="PullRequest"/> result which was created on the server</returns>
        public Task <PullRequest> Create(string owner, string name, NewPullRequest newPullRequest)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(newPullRequest, "newPullRequest");

            return(ApiConnection.Post <PullRequest>(ApiUrls.PullRequests(owner, name), newPullRequest));
        }
Пример #4
0
        /// <summary>
        /// Query pull requests for the repository based on criteria
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/pulls/#list-pull-requests
        /// </remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="request">Used to filter and sort the list of pull requests returned</param>
        /// <param name="options">Options for changing the API response</param>
        public Task <IReadOnlyList <PullRequest> > GetAllForRepository(long repositoryId, PullRequestRequest request, ApiOptions options)
        {
            Ensure.ArgumentNotNull(request, "request");
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <PullRequest>(ApiUrls.PullRequests(repositoryId),
                                                      request.ToParametersDictionary(), options));
        }
Пример #5
0
        /// <summary>
        /// Query pull requests for the repository based on criteria
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/pulls/#list-pull-requests
        /// </remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="request">Used to filter and sort the list of pull requests returned</param>
        /// <returns>A <see cref="IReadOnlyList{PullRequest}"/> of <see cref="PullRequest"/>s which match the criteria</returns>
        public Task <IReadOnlyList <PullRequest> > GetForRepository(string owner, string name, PullRequestRequest request)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(request, "request");

            return(ApiConnection.GetAll <PullRequest>(ApiUrls.PullRequests(owner, name),
                                                      request.ToParametersDictionary()));
        }
Пример #6
0
        public Task <IReadOnlyList <PullRequest> > GetAllForRepository(string owner, string name, PullRequestRequest request, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
            Ensure.ArgumentNotNull(request, nameof(request));
            Ensure.ArgumentNotNull(options, nameof(options));

            return(ApiConnection.GetAll <PullRequest>(ApiUrls.PullRequests(owner, name),
                                                      request.ToParametersDictionary(), AcceptHeaders.DraftPullRequestApiPreview, options));
        }
Пример #7
0
        public Task <PullRequest> Create(long repositoryId, NewPullRequest newPullRequest)
        {
            Ensure.ArgumentNotNull(newPullRequest, nameof(newPullRequest));

            return(ApiConnection.Post <PullRequest>(ApiUrls.PullRequests(repositoryId), newPullRequest, AcceptHeaders.DraftPullRequestApiPreview));
        }
Пример #8
0
        /// <summary>
        /// Create a pull request for the specified repository.
        /// </summary>
        /// <remarks>http://developer.github.com/v3/pulls/#create-a-pull-request</remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="newPullRequest">A <see cref="NewPullRequest"/> instance describing the new PullRequest to create</param>
        public Task <PullRequest> Create(long repositoryId, NewPullRequest newPullRequest)
        {
            Ensure.ArgumentNotNull(newPullRequest, "newPullRequest");

            return(ApiConnection.Post <PullRequest>(ApiUrls.PullRequests(repositoryId), newPullRequest));
        }