danger / peril

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

Retry Github API requests using async-retry #446

Closed jtreanor closed 5 years ago

jtreanor commented 5 years ago

This fixes https://github.com/danger/peril/issues/440 by retrying the failed API requests up to 3 times. It also provides some resilience against 5xx failures. This is what Github recommends to work around the issue.

I thought about caching file contents as discussed in #440, but the failure could still happen when they are first requested so I think it's better to work around it completely.

orta commented 5 years ago

There's, like, a module for everything in npm

orta commented 5 years ago

Cool - yep, thanks!

jtreanor commented 5 years ago

There's, like, a module for everything in npm

Yeah 😂

Thanks!