Issue() public static method

Returns the Uri for the specified issue.
public static Issue ( long repositoryId, int number ) : Uri
repositoryId long The Id of the repository
number int The issue number
return System.Uri
Esempio n. 1
0
        /// <summary>
        /// Gets a single Issue by number.
        /// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/issues/#get-a-single-issue
        /// </remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="number">The issue number</param>
        public Task <Issue> Get(string owner, string name, int number)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return(ApiConnection.Get <Issue>(ApiUrls.Issue(owner, name, number), null, AcceptHeaders.ReactionsPreview));
        }
Esempio n. 2
0
        /// <summary>
        /// Gets a single Issue by number./// </summary>
        /// <remarks>
        /// http://developer.github.com/v3/issues/#get-a-single-issue
        /// </remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="number">The issue number</param>
        /// <returns></returns>
        public async Task <Issue> Get(string owner, string name, int number)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return(await ApiConnection.Get <Issue>(ApiUrls.Issue(owner, name, number)));
        }
Esempio n. 3
0
        /// <summary>
        /// Updates an issue for the specified repository. Issue owners and users with push access can edit an issue.
        /// </summary>
        /// <remarks>https://developer.github.com/v3/issues/#edit-an-issue</remarks>
        /// <param name="owner">The owner of the repository</param>
        /// <param name="name">The name of the repository</param>
        /// <param name="number">The issue number</param>
        /// <param name="issueUpdate">An <see cref="IssueUpdate"/> instance describing the changes to make to the issue
        /// </param>
        public Task <Issue> Update(string owner, string name, int number, IssueUpdate issueUpdate)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(issueUpdate, "issueUpdate");

            return(ApiConnection.Patch <Issue>(ApiUrls.Issue(owner, name, number), issueUpdate));
        }
Esempio n. 4
0
 /// <summary>
 /// Gets a single Issue by number.
 /// </summary>
 /// <remarks>
 /// http://developer.github.com/v3/issues/#get-a-single-issue
 /// </remarks>
 /// <param name="repositoryId">The Id of the repository</param>
 /// <param name="number">The issue number</param>
 public Task <Issue> Get(int repositoryId, int number)
 {
     return(ApiConnection.Get <Issue>(ApiUrls.Issue(repositoryId, number), null, AcceptHeaders.ReactionsPreview));
 }
Esempio n. 5
0
        /// <summary>
        /// Updates an issue for the specified repository. Any user with pull access to a repository can update an
        /// issue.
        /// </summary>
        /// <remarks>http://developer.github.com/v3/issues/#edit-an-issue</remarks>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="number">The issue number</param>
        /// <param name="issueUpdate">An <see cref="IssueUpdate"/> instance describing the changes to make to the issue
        /// </param>
        public Task <Issue> Update(int repositoryId, int number, IssueUpdate issueUpdate)
        {
            Ensure.ArgumentNotNull(issueUpdate, "issueUpdate");

            return(ApiConnection.Patch <Issue>(ApiUrls.Issue(repositoryId, number), issueUpdate));
        }