Merge pull request #435

This commit is contained in:
Kohsuke Kawaguchi
2018-08-29 20:15:08 -07:00
6 changed files with 158 additions and 66 deletions

View File

@@ -1304,7 +1304,7 @@ public class GHRepository extends GHObject {
*/
public Map<String,GHBranch> getBranches() throws IOException {
Map<String,GHBranch> r = new TreeMap<String,GHBranch>();
for (GHBranch p : root.retrieve().withPreview(LOKI).to(getApiTailUrl("branches"), GHBranch[].class)) {
for (GHBranch p : root.retrieve().to(getApiTailUrl("branches"), GHBranch[].class)) {
p.wrap(this);
r.put(p.getName(),p);
}
@@ -1312,7 +1312,7 @@ public class GHRepository extends GHObject {
}
public GHBranch getBranch(String name) throws IOException {
return root.retrieve().withPreview(LOKI).to(getApiTailUrl("branches/"+name),GHBranch.class).wrap(this);
return root.retrieve().to(getApiTailUrl("branches/"+name),GHBranch.class).wrap(this);
}
/**