peril
peril copied to clipboard
Guidance needed over repos and rules covering same event
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.
{
"repos": {
"org/some-project": {
"pull_request.labeled": [
"org/peril@scripts/org/pull_request.labeled.js",
"org/peril@scripts/some-project/pull_request.labeled.js"
]
}
}
}
{
"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.
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 https://github.com/danger/peril/commit/5a4ac2fed4cf5f441b70c7e645f37f241a9164e2 , but it passed :-/
If you set the env var for DEBUG="*" in peril (Assuming heroku it'll be something like heroku config:set DEBUG="*"
) you'll get a lot of debugging output that should help point to where there's some incorrect data in the system
Thanks @orta, I have pasted the log output below for a "pull_request.labeled"
event I tried. I can see it is walking an AST but beyond that I can't see anything I recognise to suggest why this issue is happening for us. Sorry I can't help more.
Expand to view Log Output
2018-08-06T07:23:55.046962+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: Parse start
2018-08-06T07:23:55.047704+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: Parse stop
2018-08-06T07:23:55.047746+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: Start set AST
2018-08-06T07:23:55.048071+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: enter
2018-08-06T07:23:55.048133+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: Recursing into...
2018-08-06T07:23:55.048235+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: enter
2018-08-06T07:23:55.048348+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: Recursing into...
2018-08-06T07:23:55.048443+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.callee Identifier: enter
2018-08-06T07:23:55.048549+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.callee Identifier: Recursing into...
2018-08-06T07:23:55.048609+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.callee Identifier: exit
2018-08-06T07:23:55.048733+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.arguments[0] StringLiteral: enter
2018-08-06T07:23:55.048792+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.arguments[0] StringLiteral: Recursing into...
2018-08-06T07:23:55.048859+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.arguments[0] StringLiteral: exit
2018-08-06T07:23:55.048989+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: exit
2018-08-06T07:23:55.049073+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: exit
2018-08-06T07:23:55.049163+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: End set AST
2018-08-06T07:23:55.049287+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: Start transform traverse
2018-08-06T07:23:55.050192+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program Program: enter
2018-08-06T07:23:55.050439+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: Inserted.
2018-08-06T07:23:55.050510+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program Program: Recursing into...
2018-08-06T07:23:55.050592+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: enter
2018-08-06T07:23:55.050661+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: Recursing into...
2018-08-06T07:23:55.050739+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: exit
2018-08-06T07:23:55.050827+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: enter
2018-08-06T07:23:55.050906+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: Recursing into...
2018-08-06T07:23:55.050990+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: enter
2018-08-06T07:23:55.051069+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: Recursing into...
2018-08-06T07:23:55.051164+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.arguments[0] StringLiteral: enter
2018-08-06T07:23:55.051220+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.arguments[0] StringLiteral: Recursing into...
2018-08-06T07:23:55.051320+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.arguments[0] StringLiteral: exit
2018-08-06T07:23:55.051397+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: exit
2018-08-06T07:23:55.051464+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: exit
2018-08-06T07:23:55.051544+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program Program: exit
2018-08-06T07:23:55.051686+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: enter
2018-08-06T07:23:55.051755+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: Recursing into...
2018-08-06T07:23:55.051842+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: exit
2018-08-06T07:23:55.051917+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: enter
2018-08-06T07:23:55.051977+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: Recursing into...
2018-08-06T07:23:55.052074+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: enter
2018-08-06T07:23:55.052144+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: Recursing into...
2018-08-06T07:23:55.052228+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.callee Identifier: enter
2018-08-06T07:23:55.052298+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.callee Identifier: Recursing into...
2018-08-06T07:23:55.052359+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.callee Identifier: exit
2018-08-06T07:23:55.052830+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: exit
2018-08-06T07:23:55.052832+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: exit
2018-08-06T07:23:55.052833+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: enter
2018-08-06T07:23:55.052834+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: Recursing into...
2018-08-06T07:23:55.052835+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: exit
2018-08-06T07:23:55.052836+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: End transform traverse
2018-08-06T07:23:55.052867+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: Generation start
2018-08-06T07:23:55.053268+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: Generation end
2018-08-06T07:23:55.059066+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: Parse start
2018-08-06T07:23:55.059301+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: Parse stop
2018-08-06T07:23:55.059359+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: Start set AST
2018-08-06T07:23:55.059479+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: enter
2018-08-06T07:23:55.059551+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: Recursing into...
2018-08-06T07:23:55.059624+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: enter
2018-08-06T07:23:55.059681+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: Recursing into...
2018-08-06T07:23:55.059764+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.callee Identifier: enter
2018-08-06T07:23:55.059846+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.callee Identifier: Recursing into...
2018-08-06T07:23:55.059892+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.callee Identifier: exit
2018-08-06T07:23:55.059975+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.arguments[0] StringLiteral: enter
2018-08-06T07:23:55.060030+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.arguments[0] StringLiteral: Recursing into...
2018-08-06T07:23:55.060092+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.arguments[0] StringLiteral: exit
2018-08-06T07:23:55.060155+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: exit
2018-08-06T07:23:55.060232+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: exit
2018-08-06T07:23:55.060292+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: End set AST
2018-08-06T07:23:55.060387+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: Start transform traverse
2018-08-06T07:23:55.061053+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program Program: enter
2018-08-06T07:23:55.061208+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: Inserted.
2018-08-06T07:23:55.061258+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program Program: Recursing into...
2018-08-06T07:23:55.061338+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: enter
2018-08-06T07:23:55.061392+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: Recursing into...
2018-08-06T07:23:55.061449+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: exit
2018-08-06T07:23:55.061531+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: enter
2018-08-06T07:23:55.061587+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: Recursing into...
2018-08-06T07:23:55.061666+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: enter
2018-08-06T07:23:55.061720+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: Recursing into...
2018-08-06T07:23:55.061798+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.arguments[0] StringLiteral: enter
2018-08-06T07:23:55.061856+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.arguments[0] StringLiteral: Recursing into...
2018-08-06T07:23:55.061908+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.arguments[0] StringLiteral: exit
2018-08-06T07:23:55.061987+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: exit
2018-08-06T07:23:55.062052+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: exit
2018-08-06T07:23:55.062105+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program Program: exit
2018-08-06T07:23:55.062230+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: enter
2018-08-06T07:23:55.062281+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: Recursing into...
2018-08-06T07:23:55.062340+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: exit
2018-08-06T07:23:55.062424+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: enter
2018-08-06T07:23:55.062476+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: Recursing into...
2018-08-06T07:23:55.062543+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: enter
2018-08-06T07:23:55.062605+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: Recursing into...
2018-08-06T07:23:55.062684+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.callee Identifier: enter
2018-08-06T07:23:55.062738+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.callee Identifier: Recursing into...
2018-08-06T07:23:55.062803+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression.callee Identifier: exit
2018-08-06T07:23:55.062864+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0].expression CallExpression: exit
2018-08-06T07:23:55.062925+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.body[0] ExpressionStatement: exit
2018-08-06T07:23:55.063001+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: enter
2018-08-06T07:23:55.063057+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: Recursing into...
2018-08-06T07:23:55.063117+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel program.directives[0] Directive: exit
2018-08-06T07:23:55.063176+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: End transform traverse
2018-08-06T07:23:55.063225+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: Generation start
2018-08-06T07:23:55.063473+00:00 app[web.1]: Mon, 06 Aug 2018 07:23:55 GMT babel:file /app/danger-0.91fbomln826.js: Generation end
2018-08-06T07:23:55.063936+00:00 app[web.1]: info: [runner] - Commenting, with results:
2018-08-06T07:23:55.063938+00:00 app[web.1]: mds: 0
2018-08-06T07:23:55.063939+00:00 app[web.1]: messages: 2
2018-08-06T07:23:55.063941+00:00 app[web.1]: warns: 0
2018-08-06T07:23:55.063943+00:00 app[web.1]: fails: 0
2018-08-06T07:23:55.063944+00:00 app[web.1]:
2018-08-06T07:23:55.064315+00:00 app[web.1]: 2018-08-06T07:23:55.064Z danger:executor Got Results back, current settings { dangerID: 'peril',
2018-08-06T07:23:55.064318+00:00 app[web.1]: jsonOnly: false,
2018-08-06T07:23:55.064320+00:00 app[web.1]: stdoutOnly: false,
2018-08-06T07:23:55.064321+00:00 app[web.1]: verbose: false,
2018-08-06T07:23:55.064323+00:00 app[web.1]: accessTokenIsGitHubApp: true }
2018-08-06T07:23:55.064385+00:00 app[web.1]: 2018-08-06T07:23:55.064Z danger:executor Posting via handlePostingResults
2018-08-06T07:23:55.064456+00:00 app[web.1]: 2018-08-06T07:23:55.064Z danger:GitHub::Checks Getting PR details for checks
2018-08-06T07:23:55.064592+00:00 app[web.1]: 2018-08-06T07:23:55.064Z danger:GitHubAPI Sending: https://api.github.com/repos/steprescott-org/repo-a/pulls/2 { 'Content-Type': 'application/json',
2018-08-06T07:23:55.064593+00:00 app[web.1]: Authorization: 'token v1.c3319010041764c1c7b658cfaec34a080b3badd5',
2018-08-06T07:23:55.064595+00:00 app[web.1]: Accept: 'application/vnd.github.machine-man-preview+json' }
2018-08-06T07:23:55.213849+00:00 app[web.1]: 2018-08-06T07:23:55.213Z danger:GitHub::ResultsToCheck Generating inline annotations
2018-08-06T07:23:55.214114+00:00 app[web.1]: 2018-08-06T07:23:55.214Z danger:GitHubAPI Sending: https://api.github.com/repos/steprescott-org/repo-a/check-runs { 'Content-Type': 'application/json',
2018-08-06T07:23:55.214116+00:00 app[web.1]: Accept: 'application/vnd.github.antiope-preview+json,application/vnd.github.machine-man-preview+json',
2018-08-06T07:23:55.214118+00:00 app[web.1]: Authorization: 'token v1.c3319010041764c1c7b658cfaec34a080b3badd5' }
2018-08-06T07:23:55.364813+00:00 app[web.1]: 2018-08-06T07:23:55.364Z danger:GitHub::Checks Got response on the check API
2018 - 08 - 06T07: 23: 55.365184 + 00: 00 app[web.1]: 2018 - 08 - 06T07: 23: 55.365Z danger: GitHub:: Checks {
"id": 10839385,
"head_sha": "bc05341f60f36b4427feb562f9ffc3ad6b4436ce",
"external_id": "",
"url": "https://api.github.com/repos/steprescott-org/repo-a/check-runs/10839385",
"html_url": "https://github.com/steprescott-org/repo-a/runs/10839385",
"status": "completed",
"conclusion": "success",
"started_at": "2018-08-06T07:23:55Z",
"completed_at": "2018-08-06T07:23:55Z",
"output": {
"title": "",
"summary": "\n<!--\n 0 failure: \n 0 warning: \n 2 messages\n \n DangerID: danger-id-peril;\n-->\n\n\n\n<table>\n <thead>\n <tr>\n <th width=\"50\"></th>\n <th width=\"100%\" data-danger-table=\"true\">Messages</th>\n </tr>\n </thead>\n <tbody><tr>\n <td>:book:</td>\n <td>\n\n sky-uk pull request labeled\n </td>\n </tr>\n \n<tr>\n <td>:book:</td>\n <td>\n\n sky-uk pull request labeled\n </td>\n </tr>\n </tbody>\n</table>\n\n\n<p align=\"right\">\n Generated by :no_entry_sign: <a href=\"http://github.com/danger/danger-js/\">dangerJS</a>\n</p>\n",
"text": null,
"annotations_count": 0,
"annotations_url": "https://api.github.com/repos/steprescott-org/repo-a/check-runs/10839385/annotations"
},
"name": "Danger",
"check_suite": {
"id": 8460192
},
"app": {
"id": 14613,
"node_id": "MDM6QXBwMTQ2MTM=",
"owner": {
"login": "steprescott-org",
"id": 30042492,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjMwMDQyNDky",
"avatar_url": "https://avatars2.githubusercontent.com/u/30042492?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/steprescott-org",
"html_url": "https://github.com/steprescott-org",
"followers_url": "https://api.github.com/users/steprescott-org/followers",
"following_url": "https://api.github.com/users/steprescott-org/following{/other_user}",
"gists_url": "https://api.github.com/users/steprescott-org/gists{/gist_id}",
"starred_url": "https://api.github.com/users/steprescott-org/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/steprescott-org/subscriptions",
"organizations_url": "https://api.github.com/users/steprescott-org/orgs",
"repos_url": "https://api.github.com/users/steprescott-org/repos",
"events_url": "https://api.github.com/users/steprescott-org/events{/privacy}",
"received_events_url": "https://api.github.com/users/steprescott-org/received_events",
"type": "Organization",
"site_admin": false
},
"name": "Peril Ste org",
"description": "A runner for Danger files.",
"external_url": "https://peril-sky.herokuapp.com/",
"html_url": "https://github.com/apps/peril-ste-org",
"created_at": "2018-07-11T14:32:54Z",
"updated_at": "2018-07-11T14:32:54Z"
},
"pull_requests": [
{
"url": "https://api.github.com/repos/steprescott-org/repo-a/pulls/2",
"id": 206022108,
"number": 2,
"head": {
"ref": "whatevs",
"sha": "bc05341f60f36b4427feb562f9ffc3ad6b4436ce",
"repo": {
"id": 140712165,
"url": "https://api.github.com/repos/steprescott-org/repo-a",
"name": "repo-a"
}
},
"base": {
"ref": "master",
"sha": "112f7036a5f96605813f9285f4707558968207ea",
"repo": {
"id": 140712165,
"url": "https://api.github.com/repos/steprescott-org/repo-a",
"name": "repo-a"
}
}
}
]
}
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 DEBUG
to *
in the Heroku env and see the same problem - I'd be interested to know if it's running the same code twice (and with the wrong filenames?), or duplicating results instead.
#370 and https://github.com/danger/danger-js/commit/065b2a5c9ea8518590ba487b6cbdc9e6c4beae89