Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find pull request information for private repo #246

Open
eygraber opened this issue Jan 19, 2023 · 3 comments
Open

Could not find pull request information for private repo #246

eygraber opened this issue Jan 19, 2023 · 3 comments

Comments

@eygraber
Copy link
Contributor

I'm using the docker image with GitHub Actions, and I'm getting a failure, but all the logs say is:

Executing $(which danger) ci --process danger-kotlin --passURLForDSL --failOnErrors --no-publish-check - pid 1
Request failed [403]: https://api.github.com/repos/<me>/<repo>/pulls/<pr number>
Response: {
  "message": "Resource not accessible by integration",
  "documentation_url": "https://docs.github.com/rest/reference/pulls#get-a-pull-request"
}
Error:  
          Could not find pull request information,
          if you are using a private repo then perhaps
          Danger does not have permission to access that repo.
        
Uncaught Kotlin exception: kotlin.Exception: Command $(which danger) ci --process danger-kotlin --passURLForDSL --failOnErrors --no-publish-check exited with code 256
    at 0   danger-kotlin                       0x418785           kfun:systems.danger.cmd.Cmd.exec#internal + 1221 
    at 1   danger-kotlin                       0x419fd8           kfun:systems.danger.cmd.dangerjs.DangerJS#process(systems.danger.cmd.Command;kotlin.String;kotlin.collections.List<kotlin.String>){} + [13](https://github.com/<me>/<repo>/actions/runs/<run>/jobs/<job>#step:4:14)36 
    at 2   danger-kotlin                       0x4170c6           kfun:#main(kotlin.Array<kotlin.String>){} + 1734 
    at 3   danger-kotlin                       0x4231a3           Init_and_run_start + 1811 
    at 4   danger-kotlin                       0x4232da           main + 10 
    at 5   libc.so.6                           0x7fadb04e5d8f     0x0 + [14](https://github.com/<me>/<repo>/actions/runs/<run>/jobs/<job>#step:4:15)0383963995535 
    at 6   libc.so.6                           0x7fadb04e5e3f     __libc_start_main + 127 
    at 7   danger-kotlin                       0x405080           0x0 + 4[21](https://github.com/<me>/<repo>/actions/runs/<run>/jobs/<job>#step:4:22)4912

Here is how I'm using it in my workflow:

      - name: Danger
        uses: docker://ghcr.io/danger/danger-kotlin:1.2.0
        with:
          args: --failOnErrors --no-publish-check
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@gianluz
Copy link
Member

gianluz commented Jan 22, 2023

Have you checked if your bot account have access to the repo? Is the repo public or private? If private you may want to invite the bot account as collaborator and you should be good to go

@eygraber
Copy link
Contributor Author

I think this was due to GitHub Actions issues.

@eygraber
Copy link
Contributor Author

Looks like this is happening for a public repo now if a PR was opened by someone who isn't a collaborator - https://github.com/eygraber/gradle-conventions/actions/runs/5328997751/jobs/9655007811

@eygraber eygraber reopened this Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants