test: blocked-check 用 _req_safe 替代 _req 避免 API 错误误判 - Closes #58
CI / test (pull_request) Successful in 12s
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:
@@ -124,12 +124,7 @@ def blocked_check():
|
|||||||
If no references found or all referenced issues are closed,
|
If no references found or all referenced issues are closed,
|
||||||
removes the 'blocked' label.
|
removes the 'blocked' label.
|
||||||
"""
|
"""
|
||||||
try:
|
all_blocked = _req_safe("GET", "/issues?state=open&labels=blocked")
|
||||||
all_blocked = _req("GET", "/issues?state=open&labels=blocked")
|
|
||||||
except SystemExit:
|
|
||||||
print("No blocked issues found.")
|
|
||||||
return
|
|
||||||
|
|
||||||
if not all_blocked:
|
if not all_blocked:
|
||||||
print("No blocked issues found.")
|
print("No blocked issues found.")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user