juliangruber / approve-pull-request-action

A GitHub Action for approving pull requests.
MIT License
59 stars 20 forks source link

Error: Not Found - https://docs.github.com/rest #77

Closed jdouitsis closed 3 weeks ago

jdouitsis commented 3 weeks ago

Hello,

I ran this GH action like so

      - name: Approve Pull Request
        uses: juliangruber/approve-pull-request-action@v2
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          number: ${{ steps.synchronize.outputs.pull_request_number }}
          repo: jdouitsis/crowdinTest

And this is the output I got

Run juliangruber/approve-pull-request-action@v2
  with:
    github-token: ***
    repo: jdouitsis/crowdinTest

Error: Not Found - https://docs.github.com/rest

Any advice would be greatly appreciated!

EDIT: Nov 8, 2024 The repository in question jdouitsis/crowdinTest is a private repository

Solution ✅ Turns out there was a lag between the PR being created and the the step for approving it. So once I put in a 5 second delay between PR creation and approval, everything worked out well. Also had to have a different GITHUB_TOKEN for creating and approving said PR

juliangruber commented 3 weeks ago

https://github.com/jdouitsis/crowdinTest can't be found. The repository needs to exist

jdouitsis commented 3 weeks ago

@juliangruber should have added that it's a private repository. Does this action only work on public ones?

juliangruber commented 3 weeks ago

If it's a private repository then you need to pass a GitHub token that has access to this repository.

jdouitsis commented 3 weeks ago

I tried it with a super GitHub token and then made the repo public and got the same result. I feel like I'm doing something obviously wrong but can't pin it.

Public repo: https://github.com/jdouitsis/crowdinTest Using super GH_TOKEN GH Workflow: https://github.com/jdouitsis/crowdinTest/blob/main/.github/workflows/translate-messages.yml

Any thoughts?

juliangruber commented 3 weeks ago

Please reach out go GitHub support for these matters, this is not related to this action 🙏

jdouitsis commented 3 weeks ago

Solution ✅ Turns out there was a lag between the PR being created and the the step for approving it. So once I put in a 5 second delay between PR creation and approval, everything worked out well. Also had to have a different GITHUB_TOKEN for creating and approving said PR