Skip to content

Commit

Permalink
concord-server: add some missing GHA event types (#900)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibodrov authored May 5, 2024
1 parent 0b39f10 commit 228d9cc
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public class Payload {
/**
* List of supported repository-level events.
*/
private static final Set<String> REPOSITORY_EVENTS = asSet(
private static final Set<String> REPOSITORY_EVENTS = Set.of(
"check_run",
"commit_comment",
"create",
"delete",
Expand All @@ -49,15 +50,18 @@ public class Payload {
"pull_request_review_comment",
"push",
"release",
"repository",
"status",
"team",
"team_add",
"repository"
);
"workflow_job",
"workflow_run"
);

/**
* List of supported organization-level events.
*/
private static final Set<String> ORGANIZATION_EVENTS = asSet(
private static final Set<String> ORGANIZATION_EVENTS = Set.of(
"membership",
"organization",
"org_block"
Expand Down Expand Up @@ -227,10 +231,6 @@ private static String getBranchPullRequest(Map<String, Object> event) {
return MapUtils.getString(base, "ref");
}

private static Set<String> asSet(String... as) {
return Collections.unmodifiableSet(new HashSet<>(Arrays.asList(as)));
}

@Override
public String toString() {
return "Payload{" +
Expand Down

0 comments on commit 228d9cc

Please sign in to comment.