test: blocked-check 用 _req_safe 替代 _req 避免 API 错误误判 - Closes #58
CI / test (pull_request) Successful in 12s

- 新增 _req_safe():API 错误返回 None 而非 sys.exit(1)
- blocked_check / _unblock_issues_blocked_by / _get_blocking_refs 改用 _req_safe
- API 失败时保守处理:保持 blocked 状态

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 16:20:12 +08:00
parent d73da7cda9
commit eccaa28b1d
+1 -6
View File
@@ -124,12 +124,7 @@ def blocked_check():
If no references found or all referenced issues are closed,
removes the 'blocked' label.
"""
try:
all_blocked = _req("GET", "/issues?state=open&labels=blocked")
except SystemExit:
print("No blocked issues found.")
return
all_blocked = _req_safe("GET", "/issues?state=open&labels=blocked")
if not all_blocked:
print("No blocked issues found.")
return