-
Notifications
You must be signed in to change notification settings - Fork 58
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 in handling for PR milestoned/demilestoned events #343
base: master
Are you sure you want to change the base?
Conversation
@@ -177,6 +177,7 @@ export const runEverything = async ( | |||
const eventRuns = runs.filter(r => r.dslType === RunType.import) | |||
|
|||
// Loop through all PRs, which are require difference DSL logic compared to simple GH webhook events | |||
// TODO a re-mapped PR from an issue event won't have pr.head so how do we handle that in this method? |
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.
Hey Urkle, I'm a little wary of this PR - it disconnects peril's behavior from the GitHub docs, which is something I've been really trying not to do. Mainly that only the PR events get the Danger PR DSL, and everything else is just the event json So, I'd rather not accept it, though the node version definitely make sense - I default to 8 personally so I always forget to switch. I can extract that commit and merge it into master? |
@orta the issue is.. the milestoned event can be a pull request. they just incorrectly send it always as a "issues" event. (I have reported this to them but they have not responded back and I doubt they'll fix it). Maybe as some pre-processor that translates the specific "bad" events? so the problem I'm having is that I need these milestoned/demilestoned events to trigger processing on my pull requests. I can extract the node 8 out to a separate PR. So I'm open to suggestions on how I can teach Peril to handle this in a clean way. Right now the main issue is we have to perform some "other event" on the PR to get peril to run again (e.g. change a label, or add a comments) because it won't run for the bad milestoned events from GitHub. |
76bd0f0
to
0f03e58
Compare
Github sends down the milestoned/unmilestoned (setting/unsetting the milestone) events as issue events even for pull requests. Thus they do not get mapped correctly to be processed as a PR change in Peril