Open Miepee opened 10 months ago
We're having the same issue! @Miepee did you find a solution yet?
Not really. I just downgraded to v6.
Not sure if it will work for you, but I found that adding .endpoint.merge
after the list call seems to work for my script:
console.log('Getting Pull Request Commits:')
- const commits = await github.rest.pulls.listCommits({
+ const commits = await github.rest.pulls.listCommits.endpoint.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ github.event.number }}
})
From what I can find, this was actually the method we should use. See this example: https://github.com/marketplace/actions/github-script#welcome-a-first-time-contributor
I am too seeing this issue.
Describe the bug When trying to iterate over pull requests with gh-script v7, it throws. This did not happen with v6.
To Reproduce Steps to reproduce the behavior:
Expected behavior The runner should not throw, and the log statement should get printed.
Current behaviour The runner throws. Stacktrace: