Guidance needed over repos and rules covering same event
- Dominant language
- TypeScript
- Stars
- 460
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
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.
```json
{
"repos": {
"org/some-project": {
"pull_request.labeled": [
"org/peril@scripts/org/pull_request.labeled.js",
"org/peril@scripts/some-project/pull_request.labeled.js"
]
}
}
}
```
```json
{
"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"
}
}
}
```
### 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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.