@@ -140,6 +140,10 @@ public GHUser getOwner() throws IOException {
140
140
return root .getUser (owner .login ); // because 'owner' isn't fully populated
141
141
}
142
142
143
+ public GHIssue getIssue (int id ) throws IOException {
144
+ return root .retrieve ().to ("/repos/" + owner .login + "/" + name + "/issues/" + id , GHIssue .class ).wrap (this );
145
+ }
146
+
143
147
public List <GHIssue > getIssues (GHIssueState state ) throws IOException {
144
148
return Arrays .asList (GHIssue .wrap (root .retrieve ().to ("/repos/" + owner .login + "/" + name + "/issues?state=" + state .toString ().toLowerCase (), GHIssue [].class ), this ));
145
149
}
@@ -333,7 +337,7 @@ public GHRepository fork() throws IOException {
333
337
* Newly forked repository that belong to you.
334
338
*/
335
339
public GHRepository forkTo (GHOrganization org ) throws IOException {
336
- new Requester (root ).to (String .format ("/repos/%s/%s/forks?org=%s" ,owner .login ,name ,org .getLogin ()));
340
+ new Requester (root ).to (String .format ("/repos/%s/%s/forks?org=%s" , owner .login , name , org .getLogin ()));
337
341
338
342
// this API is asynchronous. we need to wait for a bit
339
343
for (int i =0 ; i <10 ; i ++) {
@@ -476,7 +480,7 @@ public GHCommitStatus getLastCommitStatus(String sha1) throws IOException {
476
480
*/
477
481
public GHCommitStatus createCommitStatus (String sha1 , GHCommitState state , String targetUrl , String description ) throws IOException {
478
482
return new Requester (root )
479
- .with ("state" ,state .name ().toLowerCase (Locale .ENGLISH ))
483
+ .with ("state" , state .name ().toLowerCase (Locale .ENGLISH ))
480
484
.with ("target_url" , targetUrl )
481
485
.with ("description" , description )
482
486
.to (String .format ("/repos/%s/%s/statuses/%s" ,owner .login ,this .name ,sha1 ),GHCommitStatus .class ).wrapUp (root );
@@ -504,7 +508,7 @@ public GHHook createHook(String name, Map<String,String> config, Collection<GHEv
504
508
}
505
509
506
510
return new Requester (root )
507
- .with ("name" ,name )
511
+ .with ("name" , name )
508
512
.with ("active" , active )
509
513
._with ("config" , config )
510
514
._with ("events" ,ea )
0 commit comments