Regression with v7 when trying to iterate over pull requests.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- github-actions, javascript, typescript
- Ambito
- api, developer-experience
Direzione di ricerca
Reproduce the workflow using github.rest.pulls.list and github.paginate.iterator, then inspect the v7 bundle around dist/index.js lines 6790 and 9561 shown in the stack trace. Compare the v7 behavior with v6 and verify that iterating over pull requests reaches the log statement without constructing a malformed request.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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:
- Use the following workflow file:
name: Test
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
const {owner, repo} = context.repo;
await (async () =>
{
const pulls = await github.rest.pulls.list({owner, repo});
for await (const {data} of github.paginate.iterator(pulls))
{
console.log(`throws before reaching this :(`)
}
})();
- Run it manually.
Expected behavior
The runner should not throw, and the log statement should get printed.
Current behaviour
The runner throws. Stacktrace:
RequestError [HttpError]: fetch failed
Error: Unhandled error: HttpError: fetch failed
at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:9561:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.next (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:6790:28)
at async eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:7:25)
at async eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:4:22)
at async main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:20) {
status: 500,
request: {
method: 'GET',
url: 'https://api.github.com/repos/Miepee/UndertaleModTool/pulls?status=200&data=%5Bobject%20Object%5D',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'actions/github-script octokit-core.js/5.0.1 Node.js/20.8.1 (linux; x64)',
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
'cache-control': 'private, max-age=60, s-maxage=60',
'content-encoding': 'gzip',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Thu, 11 Jan 2024 23:12:31 GMT',
etag: 'W/"1165e356503087f242702ad9929ff805d799a1c781f263c5403dfdc189df3eee"',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'GitHub.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
vary: 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With',
'x-accepted-github-permissions': 'pull_requests=read',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-api-version-selected': '2022-11-28',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': '3889:755A:50E4AD4:A717D92:65A075DE',
'x-ratelimit-limit': '1000',
'x-ratelimit-remaining': '997',
'x-ratelimit-reset': '1705018126',
'x-ratelimit-resource': 'core',
'x-ratelimit-used': '3',
'x-xss-protection': '0',
authorization: 'token [REDACTED]'
},
request: {
agent: [Agent],
fetch: [Function: proxyFetch],
hook: [Function: bound bound register]
}
}
}
- Lingua principale
- TypeScript
- Stelle
- 5k
- Fork
- 586
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di actions/github-script
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
actions/github-script#728 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
actions/github-script#727 · 1 reazione ·
-
{ Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
actions/github-script#724 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
actions/github-script#723 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
actions/github-script#714 · 1 commento · 4 reazioni ·