-
Notifications
You must be signed in to change notification settings - Fork 775
GHEvents enum is missing workflow_job #1288
Copy link
Copy link
Closed
Description
Describe the bug
I’m trying to set up a webhook for a GitHub application which responds to the following events: create, delete, github_app_authorization, ping, workflow_dispatch, workflow_job, and workflow_run. However, the code failed when it tried to find the GHEvent enum value for “workflow_job”. I don’t know exactly what the difference between a “job” and a “run” is, but I can’t very well find out without setting up a webhook for both.
To Reproduce
String event = "webhook_job";
boolean found = false;
for (GHEvent ghEvent : GHEvent.values()) {
if (ghEvent.toString().equalsIgnoreCase(event)) {
found = true;
break;
}
}
if (!found)
throw new IllegalArgumentException("Invalid webhook event name: " + event);
Expected behavior
found == true
Desktop (please complete the following information):
- Java: 1.8
- Version 1.133
Additional context
https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_job
Reactions are currently unavailable