File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 41
41
<Compile Include =" Branch.cs" />
42
42
<Compile Include =" Client.cs" />
43
43
<Compile Include =" Commit.cs" />
44
+ <Compile Include =" Issue.cs" />
44
45
<Compile Include =" OAuth2Helper.cs" />
45
46
<Compile Include =" Organization.cs" />
46
47
<Compile Include =" Properties\AssemblyInfo.cs" />
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Linq ;
4
+ using System . Text ;
5
+
6
+ namespace Git . hub
7
+ {
8
+ public class IssueComment
9
+ {
10
+ public int Id { get ; private set ; }
11
+ public string Body { get ; private set ; }
12
+ public DateTime CreatedAt { get ; private set ; }
13
+ public DateTime UpdatedAt { get ; private set ; }
14
+ public User User { get ; private set ; }
15
+
16
+ /// <summary>
17
+ /// api.github.com/repos/{user}/{repo}/issues/{issue}/comments/{id}
18
+ /// </summary>
19
+ public string Url { get ; private set ; }
20
+ }
21
+ }
Original file line number Diff line number Diff line change @@ -75,6 +75,10 @@ public class PullRequest
75
75
76
76
internal RestClient _client ;
77
77
78
+ /// <summary>
79
+ /// Retrieves all Commits associated with this pull request.
80
+ /// </summary>
81
+ /// <returns></returns>
78
82
public List < PullRequestCommit > GetCommits ( )
79
83
{
80
84
var request = new RestRequest ( "/repos/{user}/{repo}/pulls/{pull}/commits" ) ;
@@ -84,5 +88,15 @@ public List<PullRequestCommit> GetCommits()
84
88
85
89
return _client . Get < List < PullRequestCommit > > ( request ) . Data ;
86
90
}
91
+
92
+ public List < IssueComment > GetIssueComments ( )
93
+ {
94
+ var request = new RestRequest ( "/repos/{user}/{repo}/issues/{pull}/comments" ) ;
95
+ request . AddUrlSegment ( "user" , Repository . Owner . Login ) ;
96
+ request . AddUrlSegment ( "repo" , Repository . Name ) ;
97
+ request . AddUrlSegment ( "pull" , Number . ToString ( ) ) ;
98
+
99
+ return _client . Get < List < IssueComment > > ( request ) . Data ;
100
+ }
87
101
}
88
102
}
You can’t perform that action at this time.
0 commit comments