Skip to content

Commit e24324b

Browse files
authored
Create EventType.java
Make it easier for parsing github events from request header
1 parent fbcd82c commit e24324b

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/*-
2+
* -\-\-
3+
* github-api
4+
* --
5+
* Copyright (C) 2016 - 2020 Spotify AB
6+
* --
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* -/-/-
19+
*/
20+
21+
package com.spotify.github.v3.activity.events;
22+
23+
import java.util.Locale;
24+
25+
public enum EventType {
26+
BRANCH_PROTECTION_RULE,
27+
CHECK_RUN,
28+
CHECK_SUITE,
29+
CODE_SCANNING_ALERT,
30+
COMMIT_COMMENT,
31+
CONTENT_REFERENCE,
32+
CREATE,
33+
DELETE,
34+
DEPLOY_KEY,
35+
DEPLOYMENT,
36+
DEPLOYMENT_STATUS,
37+
DISCUSSION,
38+
DISCUSSION_COMMENT,
39+
DOWNLOAD,
40+
FOLLOW,
41+
FORK,
42+
FORK_APPLY,
43+
GITHUB_APP_AUTHORIZATION,
44+
GIST,
45+
GOLLUM,
46+
INSTALLATION,
47+
INSTALLATION_REPOSITORIES,
48+
INTEGRATION_INSTALLATION_REPOSITORIES,
49+
ISSUE_COMMENT,
50+
ISSUES,
51+
LABEL,
52+
MARKETPLACE_PURCHASE,
53+
MEMBER,
54+
MEMBERSHIP,
55+
MERGE_QUEUE_ENTRY,
56+
MERGE_GROUP,
57+
META,
58+
MILESTONE,
59+
ORGANIZATION,
60+
ORG_BLOCK,
61+
PACKAGE,
62+
PAGE_BUILD,
63+
PROJECT_CARD,
64+
PROJECT_COLUMN,
65+
PROJECT,
66+
PING,
67+
PUBLIC,
68+
PULL_REQUEST,
69+
PULL_REQUEST_REVIEW,
70+
PULL_REQUEST_REVIEW_COMMENT,
71+
PULL_REQUEST_REVIEW_THREAD,
72+
PUSH,
73+
REGISTRY_PACKAGE,
74+
RELEASE,
75+
REPOSITORY_DISPATCH,
76+
REPOSITORY,
77+
REPOSITORY_IMPORT,
78+
REPOSITORY_VULNERABILITY_ALERT,
79+
SCHEDULE,
80+
SECURITY_ADVISORY,
81+
STAR,
82+
STATUS,
83+
TEAM,
84+
TEAM_ADD,
85+
WATCH,
86+
WORKFLOW_JOB,
87+
WORKFLOW_DISPATCH,
88+
WORKFLOW_RUN,
89+
UNKNOWN,
90+
ALL;
91+
92+
private EventType() {
93+
}
94+
95+
String toString() {
96+
return this.name().toLowerCase();
97+
}
98+
}

0 commit comments

Comments
 (0)