fiverr / dangerfile.js

🚫 Centralised dangerfile
MIT License
4 stars 1 forks source link

Use Ants Github App when using Github API #28

Open raphaelboukara opened 2 years ago

raphaelboukara commented 2 years ago

Description

Currently dangerfile uses a user token to add comments to the PR. We want to use a token from the Github App ants-bot instead in order to increase the rate limit.

see https://github.com/fiverr/anthill/issues/828.

raphaelboukara commented 2 years ago

https://app.circleci.com/pipelines/github/fiverr/blue_layer/2808/workflows/c1ef97df-6312-4704-a213-8253ec978646/jobs/21890

#!/bin/bash -eo pipefail
npx @fiverr/dangerfile@2
Running @******/dangerfile v2.3.0
Request failed [403]: https://api.github.com/repos/******/blue_layer/pulls/286
Response: {
  "message": "API rate limit exceeded for user ID 17004902.",
  "documentation_url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"
}
Request failed [403]: https://api.github.com/repos/******/blue_layer/pulls/286/commits
Response: {
  "message": "API rate limit exceeded for user ID 17004902.",
  "documentation_url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"
}
Request failed [403]: https://api.github.com/repos/******/blue_layer/pulls/286
Response: {
  "message": "API rate limit exceeded for user ID 17004902.",
  "documentation_url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"
}
Error:  
          Could not find pull request information,
          if you are using a private repo then perhaps
          Danger does not have permission to access that repo.

Exited with code exit status 1
CircleCI received exit code 1