Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c284f90

Browse filesBrowse files
committed
adding some more type-safe overloads
1 parent 349df60 commit c284f90
Copy full SHA for c284f90

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed

‎src/main/java/org/kohsuke/github/GHRepository.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHRepository.java
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,14 @@ public GHCompare getCompare(String id1, String id2) throws IOException {
406406
return compare.wrap(this);
407407
}
408408

409+
public GHCompare getCompare(GHCommit id1, GHCommit id2) throws IOException {
410+
return getCompare(id1.getSHA1(),id2.getSHA1());
411+
}
412+
413+
public GHCompare getCompare(GHBranch id1, GHBranch id2) throws IOException {
414+
return getCompare(id1.getName(),id2.getName());
415+
}
416+
409417
/**
410418
* Retrieves all refs for the github repository.
411419
* @return an array of GHRef elements coresponding with the refs in the remote repository.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.