danger / danger/kotlin

Could not find pull request information for private repo

Open
#246 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
542
Forks
48
PR merge metrics
No merged PRs in 30d

Description

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///pulls/
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){} + [13](https://github.com///actions/runs//jobs/#step:4:14)36
at 2 danger-kotlin 0x4170c6 kfun:#main(kotlin.Array){} + 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///actions/runs//jobs/#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///actions/runs//jobs/#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 }}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Docker-based GitHub Actions invocation shown in the issue, using the danger-kotlin 1.2.0 image and the `danger ci --process danger-kotlin` command. Inspect how the command obtains pull request information and handles the displayed GitHub API 403; done means private-repository pull request data is retrieved or the failure clearly identifies the required permission.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, github-actions, kotlin
Domain
api, ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.