This adds `@octokit/plugin-retry`, which we use to retry transient HTTP and network errors when making GitHub API requests. This should address transient errors like this one: https://github.com/astral-sh/uv/actions/runs/31519664724/job/93874168058?pr=19979 Excerpted: ``` Checking write access for actor 'woodruffw' on astral-sh/uv GET /repos/astral-sh/uv/collaborators/woodruffw/permission - 500 with id UNKNOWN in 226ms Actor 'woodruffw' is not permitted to run this action: Failed to verify permissions for 'woodruffw': other side closed /home/runner/work/_actions/openai/codex-action/52fe01ec70a42f454c9d2ebd47598f9fd6893d56/dist/main.js:27910 throw new Error(message); ^ Error: Actor 'woodruffw' is not permitted to run this action: Failed to verify permissions for 'woodruffw': other side closed at _Command.<anonymous> (/home/runner/work/_actions/openai/codex-action/52fe01ec70a42f454c9d2ebd47598f9fd6893d56/dist/main.js:27910:17) ``` (Note that the HTTP 500 is a red herring -- Octokit synthesizes a fake HTTP 500 when it encounters an underlying network error.) The core change here is just two lines, i.e. augmenting the Octokit instance with the plugin and then using it. I've also added tests backstopping the change. Note: I picked `@octokit/plugin-retry` because it's an official part of the Octokit SDK that GitHub provides. Signed-off-by: William Woodruff <[email protected]>
26 lines
911 B
JSON
26 lines
911 B
JSON
{
|
|
"name": "@openai/codex-action",
|
|
"version": "0.0.0",
|
|
"description": "GitHub Action to run codex exec via the Codex CLI with accompanying helper steps",
|
|
"private": true,
|
|
"scripts": {
|
|
"build": "esbuild src/main.ts --sourcemap=inline --format=cjs --bundle --platform=node --target=node20 --outdir=dist",
|
|
"check": "tsc --noEmit",
|
|
"test": "pnpm run build && node --test test/*.test.mjs"
|
|
},
|
|
"dependencies": {
|
|
"@actions/core": "^1.11.1",
|
|
"@octokit/graphql": "^8.2.2",
|
|
"@octokit/plugin-retry": "^7.2.1",
|
|
"@octokit/rest": "^21.1.1",
|
|
"commander": "14.0.1",
|
|
"string-argv": "0.3.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^20.12.7",
|
|
"esbuild": "^0.23.0",
|
|
"typescript": "^5.4.5"
|
|
},
|
|
"packageManager": "[email protected]+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319"
|
|
}
|