-
Notifications
You must be signed in to change notification settings - Fork 731
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding in support for the refs command and filters in the API
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.kohsuke.github; | ||
|
||
import java.net.URL; | ||
|
||
/** | ||
* Provides information on a Git ref from GitHub. | ||
* | ||
* @author Michael Clarke | ||
*/ | ||
public class GHRef { | ||
|
||
private String ref, url; | ||
private GHObject object; | ||
|
||
public String getRef() { | ||
return ref; | ||
} | ||
|
||
public URL getUrl() { | ||
return GitHub.parseURL(url); | ||
} | ||
|
||
public GHObject getObject() { | ||
return object; | ||
} | ||
|
||
|
||
public static class GHObject { | ||
private String type, sha, url; | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public String getSha() { | ||
return sha; | ||
} | ||
|
||
public URL getUrl() { | ||
return GitHub.parseURL(url); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters