Skip to content

Authenticate API requests #372

@llrs-roche

Description

@llrs-roche

While trying to debug a problem I saw I couldn't get bug reports from Github due to the API limits.

$bug_reports
  $message
  [1] "API rate limit exceeded for 196.3.50.247. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)"
  $documentation_url
  [1] "https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"
$bug_reports_host
  [1] "github"
$bug_reports_url
  [1] "https://github.com/teunbrand/ggh4x/issues"

riskmetric doesn't attempt to use credentials for Gihub or Gitlab (see code on R/pkg_ref_cache_bug_reports.R).

If a system is trying to get risk assessments of many packages they might run into this limit (I just did ~7 from a corporate network). It would be nice if riskmetric found credentials or reused other packages for that (for example the gh). This way it will be easier to get the information required for the assessment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions