support both v2 and v3

This commit is contained in:
Kohsuke Kawaguchi
2012-02-12 07:27:39 -08:00
parent 202a5d435c
commit 2718cf5ccb

View File

@@ -31,7 +31,7 @@ package org.kohsuke.github;
public class GHCommitPointer {
private String ref, sha, label;
private GHUser user;
private GHRepository repository;
private GHRepository repository/*V2*/,repo/*V3*/;
/**
* This points to the user who owns
@@ -45,7 +45,7 @@ public class GHCommitPointer {
* The repository that contains the commit.
*/
public GHRepository getRepository() {
return repository;
return repo!=null ? repo : repository;
}
/**