-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
IRepositoryCommentsClient.cs
159 lines (143 loc) · 8.4 KB
/
IRepositoryCommentsClient.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
namespace Octokit
{
/// <summary>
/// A client for GitHub's Repository Comments API.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/comments/">Repository Comments API documentation</a> for more information.
/// </remarks>
public interface IRepositoryCommentsClient
{
/// <summary>
/// Gets a single Repository Comment by number.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="commentId">The comment id</param>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")]
Task<CommitComment> Get(string owner, string name, long commentId);
/// <summary>
/// Gets a single Repository Comment by number.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="number">The comment number</param>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")]
Task<CommitComment> Get(long repositoryId, int number);
/// <summary>
/// Gets Commit Comments for a repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
Task<IReadOnlyList<CommitComment>> GetAllForRepository(string owner, string name);
/// <summary>
/// Gets Commit Comments for a repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository</remarks>
/// <param name="repositoryId">The Id of the repository</param>
Task<IReadOnlyList<CommitComment>> GetAllForRepository(long repositoryId);
/// <summary>
/// Gets Commit Comments for a repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="options">Options to change the API response</param>
Task<IReadOnlyList<CommitComment>> GetAllForRepository(string owner, string name, ApiOptions options);
/// <summary>
/// Gets Commit Comments for a repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="options">Options to change the API response</param>
Task<IReadOnlyList<CommitComment>> GetAllForRepository(long repositoryId, ApiOptions options);
/// <summary>
/// Gets Commit Comments for a specified Commit.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="sha">The sha of the commit</param>
Task<IReadOnlyList<CommitComment>> GetAllForCommit(string owner, string name, string sha);
/// <summary>
/// Gets Commit Comments for a specified Commit.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="sha">The sha of the commit</param>
Task<IReadOnlyList<CommitComment>> GetAllForCommit(long repositoryId, string sha);
/// <summary>
/// Gets Commit Comments for a specified Commit.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="sha">The sha of the commit</param>
/// <param name="options">Options to change the API response</param>
Task<IReadOnlyList<CommitComment>> GetAllForCommit(string owner, string name, string sha, ApiOptions options);
/// <summary>
/// Gets Commit Comments for a specified Commit.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="sha">The sha of the commit</param>
/// <param name="options">Options to change the API response</param>
Task<IReadOnlyList<CommitComment>> GetAllForCommit(long repositoryId, string sha, ApiOptions options);
/// <summary>
/// Creates a new Commit Comment for a specified Commit.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#create-a-commit-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="sha">The sha reference of commit</param>
/// <param name="newCommitComment">The new comment to add to the commit</param>
Task<CommitComment> Create(string owner, string name, string sha, NewCommitComment newCommitComment);
/// <summary>
/// Creates a new Commit Comment for a specified Commit.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#create-a-commit-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="sha">The sha reference of commit</param>
/// <param name="newCommitComment">The new comment to add to the commit</param>
Task<CommitComment> Create(long repositoryId, string sha, NewCommitComment newCommitComment);
/// <summary>
/// Updates a specified Commit Comment.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#update-a-commit-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="number">The comment number</param>
/// <param name="commentUpdate">The modified comment</param>
Task<CommitComment> Update(string owner, string name, int number, string commentUpdate);
/// <summary>
/// Updates a specified Commit Comment.
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#update-a-commit-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="number">The comment number</param>
/// <param name="commentUpdate">The modified comment</param>
Task<CommitComment> Update(long repositoryId, int number, string commentUpdate);
/// <summary>
/// Deletes the specified Commit Comment
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#delete-a-commit-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="commentId">The comment id</param>
Task Delete(string owner, string name, long commentId);
/// <summary>
/// Deletes the specified Commit Comment
/// </summary>
/// <remarks>http://developer.github.com/v3/repos/comments/#delete-a-commit-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="number">The comment number</param>
Task Delete(long repositoryId, int number);
}
}