danger / peril

☢️ Serious and immediate danger.
https://danger.systems
MIT License
461 stars 58 forks source link

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

Open grxy opened 5 years ago

grxy commented 5 years ago

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!

orta commented 5 years ago

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

grxy commented 5 years ago

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.