Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

fix(pr-pipeline): read auto-merge state back when a resent arm or disarm errors

未关闭 适合新手
#9,547 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

从 .github/scripts/pr-merge/enable-auto-merge.mjs 开始,追踪重新启用和停用时如何处理错误。找到相关测试并运行;补充覆盖重试出错后 autoMergeRequest 状态匹配和不匹配的测试。完成标准是:目标状态匹配时记录成功,而不匹配时仍然失败,并指出 pull request 和原因。

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

描述

needs-human priority: medium status: ready work-class: scoped

Problem

.github/scripts/pr-merge/enable-auto-merge.mjs resends an arm or disarm mutation after a transient network error. If the first attempt reached GitHub but its answer was lost, the resend can return an error even though the pull request already holds the target state. GitHub does not document how enablePullRequestAutoMerge answers on an already-armed pull request (https://docs.github.com/en/graphql/reference/pulls). The step then exits 1 on a correct outcome. A red pr-merge run counts toward the two-failure revert rule and the gate-repeat alert, so it is false evidence.

Fix

When a resent arm or disarm returns an error, read the pull request's autoMergeRequest once. Count it a success when the state already matches the target: armed at the same head for an arm, unarmed for a disarm.

Done when

  • A resend that errors after a lost first answer, with the pull request already in the target state, logs a success and does not fail the step.
  • A resend that errors while the state does not match still fails, naming the pull request and the cause.
  • Tests cover both cases.
主要语言
Shell
星标
22
派生
2
平均合并
2 小时 45 分钟
30 天内合并 PR
940

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

melodic-software/claude-code-plugins 的其他 Issue

查看 melodic-software/claude-code-plugins 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

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