-
Notifications
You must be signed in to change notification settings - Fork 724
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
Add SCHEDULE to GHEvent and add UNKNOWN handling to GHEvent #1096
Conversation
This is a valid event for scheduled workflow runs.
b0216a8
to
0ce7801
Compare
Codecov Report
@@ Coverage Diff @@
## master #1096 +/- ##
============================================
+ Coverage 72.80% 72.82% +0.02%
- Complexity 1813 1814 +1
============================================
Files 185 185
Lines 6078 6083 +5
Branches 366 366
============================================
+ Hits 4425 4430 +5
Misses 1432 1432
Partials 221 221
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Could you also update GHEventInfo#getType()?
Can be useful to catch values we should add instead of simply ignoring them.
@bitwiseman I added two commits:
|
if (e.name().replace("_", "").equalsIgnoreCase(t)) | ||
return e; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, I see the problem now. All this is to handle the completely different strings used in the REST API and actual event calls.
https://github.com/hub4j/github-api/blob/master/src/test/resources/org/kohsuke/github/AppTest/wiremock/testEventApi/__files/events-10.json#L283
There's got to be a better way to do this. I'll file an issue to come back to this.
SCHEDULE
is a valid event for scheduled workflow runs.Also make
GHEvent
parsing more permissive as per our discussion from the previous weeks.