Stop retrying permanent GitHub API failures in retry.sh

未关闭 适合新手
#113 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@muspi-merol-review 已经在做这个了。

开始于 2026年11月16日。

  • #116 来自 @muspi-merol-review —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github, github-actions, typescript
领域
ci-cd, tooling

调研方向

从 scripts/retry.sh 和 scripts/resolve-thread.sh 开始;检查它们如何处理 GitHub CLI 失败,以及重试脚本如何识别 DELETE 404 情况。验证网络错误、429 和 5xx 仍可重试,永久性响应会迅速失败,并且空的 PR_NUMBER 会产生清晰的错误,且不会发起查询。

由索引模型根据 Issue 内容生成。

描述

scripts/retry.sh retries every failure 8 times with exponential backoff (91 s of sleeps) and only treats a DELETE 404 as terminal. Permanent responses therefore burn the whole ladder:

  • gh: Resource not accessible by integration (HTTP 403) — the App deliberately lacks workflows permission (#99), so committing a workflow change can never succeed. Seen in 11 runs, e.g. 43089011412; the step often gets SIGTERM (exit 143) before the retries finish.
  • gh: Variable $pr of type Int! was provided invalid value — scripts/resolve-thread.sh runs with an empty $PR_NUMBER on push runs, so every attempt builds the same invalid query. Seen in 43405825862.

Retry only network errors, 429 and 5xx; fail fast on 400/401/403/404/422, keeping the DELETE-404 idempotency case. Also have resolve-thread.sh reject an empty PR_NUMBER with a clear message instead of issuing the query.

主要语言
TypeScript
星标
0
派生
0
平均合并
1 小时 39 分钟
30 天内合并 PR
84

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

promplate/code-review 的其他 Issue

查看 promplate/code-review 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。