-
Notifications
You must be signed in to change notification settings - Fork 3
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 #194 from yrodiere/i182
Use the "search issues" API instead of the "query issues" API
- Loading branch information
Showing
10 changed files
with
596 additions
and
422 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
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
39 changes: 39 additions & 0 deletions
39
src/main/java/io/quarkus/github/lottery/github/GitHubSearchClauses.java
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,39 @@ | ||
package io.quarkus.github.lottery.github; | ||
|
||
import java.time.Instant; | ||
import java.time.ZoneOffset; | ||
import java.util.Set; | ||
|
||
public final class GitHubSearchClauses { | ||
|
||
private GitHubSearchClauses() { | ||
} | ||
|
||
public static String repo(GitHubRepositoryRef ref) { | ||
return "repo:" + ref.repositoryName(); | ||
} | ||
|
||
public static String isIssue() { | ||
return "is:issue"; | ||
} | ||
|
||
public static String anyLabel(Set<String> labels) { | ||
return label(String.join(",", labels)); | ||
} | ||
|
||
public static String label(String label) { | ||
return "label:" + label; | ||
} | ||
|
||
public static String updatedBefore(Instant updatedBefore) { | ||
return "updated:<" + updatedBefore.atOffset(ZoneOffset.UTC).toLocalDateTime().toString(); | ||
} | ||
|
||
public static String author(String author) { | ||
return "author:" + author; | ||
} | ||
|
||
public static String assignee(String assignee) { | ||
return "assignee:" + assignee; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/io/quarkus/github/lottery/util/GitHubConstants.java
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,10 @@ | ||
package io.quarkus.github.lottery.util; | ||
|
||
public final class GitHubConstants { | ||
|
||
private GitHubConstants() { | ||
} | ||
|
||
public static final String BOT_LOGIN_SUFFIX = "[bot]"; | ||
|
||
} |
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.