Giter Site home page Giter Site logo

Comments (2)

jason-curtis avatar jason-curtis commented on July 17, 2024 1

Ah, I see. Thank you for the response! I forgot that GH likes to return 404s instead of 401s, and I was confused because I had earlier had an explicit permissions error (something like this token does not have access to this resource).

In any case, I worked around it by using the GITHUB_TOKEN directly and setting up permissions within the action:

    permissions:
      contents: read
      pull-requests: write

I also ended up using @mshick/add-pr-comment since it was a bit more straightforward for my use case.

from create-or-update-comment.

peter-evans avatar peter-evans commented on July 17, 2024

Hi @jason-curtis

In the backend of GitHub, pull requests are extended issues. They use the same API. So the action is correct to try and find an issue with that number.

If you are consistently getting a 404 from the API then that would probably indicate that the token you are using doesn't have the correct permissions to access the repository contents.

  • Check the COMMENTING_ACCESS_TOKEN secret actually contains the full PAT and hasn't been accidentally truncated. Copy/paste it again.
  • Check that the PAT is created on a user that has read and write access to the target repository.
  • Check that the PAT has the correct scopes. repo for classic tokens.

from create-or-update-comment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.