github / issue-metrics

Gather metrics on issues/prs/discussions such as time to first response, count of issues opened, closed, etc.

Home Page:https://github.blog/2023-07-19-metrics-for-issues-pull-requests-and-discussions/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting rate limited when trying to collect PR data for issue-metrics

peter-laurens opened this issue · comments

I'm trying to implement the github/issue-metrics@v2 action, my main desire is to collect data on time-to-first-comment/review on Pull Requests in my repository, which this tool seems to support.

However I am getting an API rate exceeded error, when trying to use it across a window of only a couple of days content:

github3.exceptions.ForbiddenError: 403 API rate limit exceeded for installation ID 8026696. If you reach out to GitHub Support for help, please include the request ID FC00:1733:4E64548:A17BDA6:65A1A825.

The full yml is very simple for now, and looks like this:

name: PR Metrics Test
on: push

permissions:
  pull-requests: read

jobs:
  build:
    name: pr metrics
    runs-on: ubuntu-latest
    steps:
    - name: Run issue-metrics tool
      uses: github/issue-metrics@v2
      env:
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        SEARCH_QUERY: 'repo:<OrgHere>/<RepoHere> is:pr created:2023-05-01..2023-05-02'

... you can see I just selected a single day, but still get rate limited (it appears, at least).

I don't know what queries the tool is running under the hood though. Is this expected? The repository is not typically hugely busy, I would expect only a handful of PRs per day max.

Thanks for any guidance!

Once you've been rate limited once, it lasts for a while so that's what I expect is happening here. Have you tried running this since? Still an issue?

This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 14 days.

Moving to a feature request issue #217