peril icon indicating copy to clipboard operation
peril copied to clipboard

danger.git.diffForFile only seems to work when DANGER_GITHUB_API_TOKEN is set

Open grxy opened this issue 5 years ago • 2 comments

Hi! I really appreciate the time you've invested into danger and peril. It has been extremely valuable to me and many teams I've been on.

When I try to run danger.git.diffForFile in a PR, the diff object is resolved to null, unless I set DANGER_GITHUB_API_TOKEN with a personal access token in heroku. Is this by design, or is there some config/setup that I possibly missed so that peril has access to retrieve a diff for a file in a PR?

Thanks!

grxy avatar Aug 12 '19 00:08 grxy

Is it possible you have an old install of peril, think that got fixed recently ( https://github.com/danger/peril/issues/367#issuecomment-509542990 )

orta avatar Aug 12 '19 09:08 orta

Unfortunately, no. This is from a new Peril setup I worked on right before creating this ticket just yesterday. I followed the setup_for_org instructions.

For context, this was my second attempt at solving this in the last month or so. All diffs for another peril setup are returning null as well.

grxy avatar Aug 12 '19 15:08 grxy