Skip to content

GHEvents enum is missing workflow_job #1288

@Typraeurion

Description

@Typraeurion

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions