Repository navigation
feat: gh 补充 --enable-auto-merge 官方 CLI 别名 & 根据 CiJobSeverity 区分取消/超时/失败返回明确信息 - #409
Merged
Merged
Conversation
liuqihonggit
enabled auto-merge (squash)
October 13, 2026 14:40
liuqihonggit
disabled auto-merge
October 13, 2026 14:41
…od 官方 CLI 别名 | 决策: 官方 gh CLI 用 kebab-case, jcc 工具参数用 snake_case, 通过 LongAliasMap 别名映射桥接
…eOnly 不消费下个 token 导致 --auto-merge-method squash 中 squash 被当多余位置参数, TakeNextToken 优先用 inlineValue 兼容 --key=value 和 --key value 两种形式
…UX 改进 | 决策: JobWatchResult.FailFast 工厂方法增加 conclusion 参数避免丢失, GhRunWaitFailFastAsync 根据 CiJobSeverity 区分取消/超时/失败返回明确信息替代通用'已完成'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test
93 GhCommandResolverTests 全通过
手动验证: jcc gh pr merge 999999 --enable-auto-merge --auto-merge-method squash 参数解析成功到达 API 调用
修复 JobWatchResult.FailFast 工厂方法丢失 RunConclusion 的缺陷
GhRunWaitFailFastAsync 根据 CiJobSeverity 区分取消/超时/失败返回明确信息
新增3个单元测试覆盖 run cancelled/timed_out 场景
Root Cause
JobWatchResult.FailFast 工厂方法没有 conclusion 参数,导致 WatchRunJobsForFailureAsync 的 FastFailed 分支无法传递 RunConclusion。GhRunWaitFailFastAsync 拿到 null RunConclusion,返回"已完成: unknown"而非明确的"已取消"/"已超时"。
Test