-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1315 from sahansera/refactor-search-forks
Refactor GHContentSearchBuilder to allow a Fork type
- Loading branch information
Showing
12 changed files
with
4,839 additions
and
17 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
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,38 @@ | ||
package org.kohsuke.github; | ||
|
||
/** | ||
* The enum for Fork search mode | ||
*/ | ||
public enum GHFork { | ||
|
||
/** | ||
* Search in the parent repository and in forks with more stars than the parent repository. | ||
* | ||
* Forks with the same or fewer stars than the parent repository are still ignored. | ||
*/ | ||
PARENT_AND_FORKS("true"), | ||
|
||
/** | ||
* Search only in forks with more stars than the parent repository. | ||
* | ||
* The parent repository is ignored. If no forks have more stars than the parent, no results will be returned. | ||
*/ | ||
FORKS_ONLY("only"), | ||
|
||
/** | ||
* (Default) Search only the parent repository. | ||
* | ||
* Forks are ignored. | ||
*/ | ||
PARENT_ONLY(""); | ||
|
||
private String filterMode; | ||
GHFork(final String mode) { | ||
this.filterMode = mode; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return filterMode; | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.