-
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
Guidance needed over repos and rules covering same event #344
Comments
This feels like a bug to me TBH, I think both of those cases should work. I'd expect with: {
"rules": {
"pull_request.labeled": "org/peril@scripts/org/pull_request.labeled.js"
},
"repos" : {
"org/some-project": {
"pull_request.labeled": "org/peril@scripts/some-project/pull_request.labeled.js"
}
}
} Then for a PR labeled event I would expect the run of them both, which is odd, I just wrote a test to try verify it 5a4ac2f , but it passed :-/ If you set the env var for DEBUG="*" in peril (Assuming heroku it'll be something like |
Thanks @orta, I have pasted the log output below for a Expand to view Log Output
EDIT: This doesn't look too useful on the face of it, happy to do any further debugging for you if needed. |
I appreciate you're busy @orta, is there anything I could do myself to help move this along without using your time? some key files to look in or something like that? Thanks. |
OK, so then I think adding some logging around this section here would be a good start. This is the part where Peril triggers danger, it should be called with an array of dangerfile references including the two you mentioned |
I've been sitting down with @barbosa - and we're definitely seeing this, it's just looking really hard to diagnose because it doesn't seem to behave this way on any of my server :-/ |
I've just shipped some changes to the logger the might make it easier to understand where the problem could be, so if you set |
Thanks @orta for Danger and Peril. We've been using Danger for a few months and love it and are just getting started with Peril.
There is something we don't understand in Peril we could use your help with please, we've probably misunderstood something.
Aim
For a given event (in this case when a label is added to a PR) handle the event at the repo level, and also at the org level.
Example Settings
We have tried these two approaches which both exhibit the same behaviour. The .js files each contain a call to
message
which says"Org"
or"Repo"
respectively.Expected Behaviour
"Org"
message is output, followed by"Repo"
message.Actual Behaviour
"Org"
message is output twice, or if the array was reversed in the first example,"Repo"
was output twice.Please could you advise on whether we're going about this the wrong way or if this is possibly an issue?
Thanks a lot.
The text was updated successfully, but these errors were encountered: