Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

traceback if webhook set to "send me everything". #250

Closed
kad opened this issue Feb 29, 2016 · 0 comments
Closed

traceback if webhook set to "send me everything". #250

kad opened this issue Feb 29, 2016 · 0 comments

Comments

@kad
Copy link

kad commented Feb 29, 2016

If webhook is set to "send me everything" instead of just push events, then github-api would crash with something similar to this:

WARNING: Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=xxxx,repository=zzzzzz]
java.lang.IllegalArgumentException: No enum constant org.kohsuke.github.GHEvent.*
        at java.lang.Enum.valueOf(Enum.java:238)
        at org.kohsuke.github.GHHook.getEvents(GHHook.java:30)
        at org.jenkinsci.plugins.github.webhook.WebhookManager$7.applyNullSafe(WebhookManager.java:258)
        at org.jenkinsci.plugins.github.webhook.WebhookManager$7.applyNullSafe(WebhookManager.java:255)
        at org.jenkinsci.plugins.github.util.misc.NullSafeFunction.apply(NullSafeFunction.java:18)


    "events": [
      "*"
    ],

in theory, org.kohsuke.github.GHHook.getEvents should be able to see if "e" == "*", and skip it or add all known enums to return set... not sure about logic/usage of that function in different places.

@kohsuke kohsuke closed this as completed in 14f7198 Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant