first pass at cleaning up attributes (#2157)

This commit is contained in:
Brendan Forster
2020-03-18 09:02:11 -03:00
committed by GitHub
parent 327020750f
commit dc2f6ff001
54 changed files with 402 additions and 383 deletions

View File

@@ -28,7 +28,7 @@ namespace Octokit
/// <param name="number">The comment id</param>
/// <remarks>http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment</remarks>
[Preview("squirrel-girl")]
[ManualRoute("GET", "/repos/{owner}/{name}/comments/{number}")]
[ManualRoute("GET", "/repos/{owner}/{repo}/comments/{comment_id}")]
public Task<CommitComment> Get(string owner, string name, int number)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
@@ -56,7 +56,7 @@ namespace Octokit
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository</remarks>
[ManualRoute("GET", "/repos/{owner}/{name}/comments")]
[ManualRoute("GET", "/repos/{owner}/{repo}/comments")]
public Task<IReadOnlyList<CommitComment>> GetAllForRepository(string owner, string name)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
@@ -84,7 +84,7 @@ namespace Octokit
/// <param name="options">Options to change the API response</param>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository</remarks>
[Preview("squirrel-girl")]
[ManualRoute("GET", "/repos/{owner}/{name}/comments")]
[ManualRoute("GET", "/repos/{owner}/{repo}/comments")]
public Task<IReadOnlyList<CommitComment>> GetAllForRepository(string owner, string name, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
@@ -116,7 +116,7 @@ namespace Octokit
/// <param name="name">The name of the repository</param>
/// <param name="sha">The sha of the commit</param>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit</remarks>
[ManualRoute("GET", "/repos/{owner}/{name}/commits/{sha}/comments")]
[ManualRoute("GET", "/repos/{owner}/{repo}/commits/{commit_sha}/comments")]
public Task<IReadOnlyList<CommitComment>> GetAllForCommit(string owner, string name, string sha)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
@@ -132,7 +132,7 @@ namespace Octokit
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="sha">The sha of the commit</param>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit</remarks>
[ManualRoute("GET", "/repositories/{id}/commits/{sha}/comments")]
[ManualRoute("GET", "/repositories/{id}/commits/{commit_sha}/comments")]
public Task<IReadOnlyList<CommitComment>> GetAllForCommit(long repositoryId, string sha)
{
Ensure.ArgumentNotNullOrEmptyString(sha, nameof(sha));
@@ -149,7 +149,7 @@ namespace Octokit
/// <param name="options">Options to change the API response</param>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit</remarks>
[Preview("squirrel-girl")]
[ManualRoute("GET", "/repos/{owner}/{name}/commits/{sha}/comments")]
[ManualRoute("GET", "/repos/{owner}/{repo}/commits/{commit_sha}/comments")]
public Task<IReadOnlyList<CommitComment>> GetAllForCommit(string owner, string name, string sha, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
@@ -168,7 +168,7 @@ namespace Octokit
/// <param name="options">Options to change the API response</param>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit</remarks>
[Preview("squirrel-girl")]
[ManualRoute("GET", "/repositories/{id}/commits/{sha}/comments")]
[ManualRoute("GET", "/repositories/{id}/commits/{commit_sha}/comments")]
public Task<IReadOnlyList<CommitComment>> GetAllForCommit(long repositoryId, string sha, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(sha, nameof(sha));
@@ -185,7 +185,7 @@ namespace Octokit
/// <param name="sha">The sha reference of commit</param>
/// <param name="newCommitComment">The new comment to add to the commit</param>
/// <remarks>http://developer.github.com/v3/repos/comments/#create-a-commit-comment</remarks>
[ManualRoute("POST", "/repos/{owner}/{name}/commits/{sha}/comments")]
[ManualRoute("POST", "/repos/{owner}/{repo}/commits/{commit_sha}/comments")]
public Task<CommitComment> Create(string owner, string name, string sha, NewCommitComment newCommitComment)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
@@ -203,7 +203,7 @@ namespace Octokit
/// <param name="sha">The sha reference of commit</param>
/// <param name="newCommitComment">The new comment to add to the commit</param>
/// <remarks>http://developer.github.com/v3/repos/comments/#create-a-commit-comment</remarks>
[ManualRoute("POST", "/repositories/{id}/commits/{sha}/comments")]
[ManualRoute("POST", "/repositories/{id}/commits/{commit_sha}/comments")]
public Task<CommitComment> Create(long repositoryId, string sha, NewCommitComment newCommitComment)
{
Ensure.ArgumentNotNullOrEmptyString(sha, nameof(sha));
@@ -220,7 +220,7 @@ namespace Octokit
/// <param name="number">The comment number</param>
/// <param name="commentUpdate">The modified comment</param>
/// <remarks>http://developer.github.com/v3/repos/comments/#update-a-commit-comment</remarks>
[ManualRoute("PATCH", "/repos/{owner}/{name}/comments/{number}")]
[ManualRoute("PATCH", "/repos/{owner}/{repo}/comments/{comment_id}")]
public Task<CommitComment> Update(string owner, string name, int number, string commentUpdate)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
@@ -252,7 +252,7 @@ namespace Octokit
/// <param name="name">The name of the repository</param>
/// <param name="number">The comment id</param>
/// <remarks>http://developer.github.com/v3/repos/comments/#delete-a-commit-comment</remarks>
[ManualRoute("DELETE", "/repos/{owner}/{name}/comments/{number}")]
[ManualRoute("DELETE", "/repos/{owner}/{repo}/comments/{comment_id}")]
public Task Delete(string owner, string name, int number)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));