Problem
When the org scan dispatches pr-review for issues labeled action:review, it raises an unhandled ValueError if no linked PR exists yet:
ValueError: No linked pull request found for issue #N in org/repo
This happens because a developer may label an issue action:review before opening a PR, or the PR is opened but not yet linked to the issue.
Observed occurrences (from ~/.askcc/logs/askcc.log):
weyucou/task-management#9 — 2026-03-20 04:13
weyucou/pletzer-slackbot-service#3 — 2026-03-20 12:34
Expected Behavior
Before invoking Claude for pr-review, askcc should verify that a linked PR exists. If none is found, it should skip gracefully with an informative log message (e.g. WARN: No linked PR found for issue #N, skipping pr-review) rather than raising an exception.
Suggested Fix
In _build_prompt (or before calling it for pr-review), call fetch_pr_content defensively and catch the ValueError, returning a clear skip signal to the caller.
Problem
When the org scan dispatches
pr-reviewfor issues labeledaction:review, it raises an unhandledValueErrorif no linked PR exists yet:This happens because a developer may label an issue
action:reviewbefore opening a PR, or the PR is opened but not yet linked to the issue.Observed occurrences (from
~/.askcc/logs/askcc.log):weyucou/task-management#9— 2026-03-20 04:13weyucou/pletzer-slackbot-service#3— 2026-03-20 12:34Expected Behavior
Before invoking Claude for
pr-review,askccshould verify that a linked PR exists. If none is found, it should skip gracefully with an informative log message (e.g.WARN: No linked PR found for issue #N, skipping pr-review) rather than raising an exception.Suggested Fix
In
_build_prompt(or before calling it forpr-review), callfetch_pr_contentdefensively and catch theValueError, returning a clear skip signal to the caller.