Skip to content

Implement abuse detection in GitHub API requests #206

@naveensrinivasan

Description

@naveensrinivasan

The GitHub API would return 403 if there are too many requests for example cron running for a bunch of repositories

{
      "CheckName": "Signed-Releases",
      "Pass": false,
      "Confidence": 0,
      "Details": [
        "error, retrying: GET https://api.github.com/repos/activescaffold/active_scaffold/releases: 403 You have triggered an abuse detection mechanism. Please wait a few minutes before you try again. []"
      ]
    },
    {
      "CheckName": "Signed-Tags",
      "Pass": false,
      "Confidence": 0,
      "Details": [
        "error, retrying: non-200 OK status code: 403 Forbidden body: \"{\\n  \\\"documentation_url\\\": \\\"https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#abuse-rate-limits\\\",\\n  \\\"message\\\": \\\"You have triggered an abuse detection mechanism. Please wait a few minutes before you try again.\\\"\\n}\\n\""
      ]
    }

Probably implement this solution
google/go-github#431 (comment)
https://github.com/hashicorp/terraform-provider-github/blob/fa73654b66e37b1fd8d886141d9c2974e24ba42f/github/transport.go#L42-L109 and it also has tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions