blombard / move-to-next-iteration

Automatically move issues to next iteration
MIT License
30 stars 13 forks source link

API rate limit exceeded #12

Closed fherreazcue closed 4 months ago

fherreazcue commented 4 months ago

(It is the first time I try to use this action, so apologies if I am doing something incorrectly)

I am trying to use the action as follows:

name: auto-move-sprint

on:
  schedule:
    # Runs "at 05:00, only on Monday" (see https://crontab.guru)
    - cron: '0 5 * * 1'
  workflow_dispatch:

jobs:
  move-to-next-iteration:
    name: Move to next iteration
    runs-on: ubuntu-latest

    steps:
    - uses: blombard/move-to-next-iteration@v0.5.0
      with:
        owner: XXX
        number: YYY
        token: ${{ secrets.PROJECT_PAT }}
        iteration-field: Sprint
        iteration: last
        new-iteration: current
        excluded-statuses: "Done,Won't Fix"

replacing XXX and YYY with the org name and project number.

The action is failing. This is the output I am getting:

1  Run blombard/move-to-next-iteration@v0.5.0
2   with:
3    owner: XXX
4    number: YYY
5    iteration-field: Sprint
6    iteration: last
7    new-iteration: current
8    excluded-statuses: Done,Won't Fix
9    Error: API rate limit exceeded for <ip_here>. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

Shouldn't the token be authenticating me and preventing the error? Is there something special I need to do to configure the token correctly?

Thanks

blombard commented 4 months ago

Hi @fherreazcue,

Are you using a valid PROJECT_PAT with the project scope?

Capture d’écran 2024-04-22 à 12 21 09
fherreazcue commented 4 months ago

Ah, my bad, I assumed the PROJECT_PAT was already available, like the GITHUB_TOKEN, and so I'd not created one. I created my (classic) personal access token, and added the token to a secret in the repo, as you pointed, and it now all works. Thanks!