@@ -198,14 +198,29 @@ def reply_path_without_pr(cmd: str) -> str | None:
198198 return None
199199
200200
201+ # The plugin's scripts are not on PATH: recommending a bare `pr-status.sh`
202+ # sends the reader into `command not found` (exit 127) and a hunt through the
203+ # plugin cache before the gate's advice becomes followable (2026-08-13). The
204+ # script ships in this plugin, so the message can name the invocable path;
205+ # the bare name stays as fallback for layouts where the sibling is absent.
206+ _PR_STATUS_SH = os .path .join (
207+ os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))),
208+ "skills" ,
209+ "git-workflow" ,
210+ "scripts" ,
211+ "pr-status.sh" ,
212+ )
213+ PR_STATUS = _PR_STATUS_SH if os .path .isfile (_PR_STATUS_SH ) else "pr-status.sh"
214+
215+
201216def handrolled_pr_poll (cmd : str ) -> str | None :
202217 if "--watch" in cmd or not POLLS_PR .search (cmd ):
203218 return None
204219 if not (POLL_LOOP .search (cmd ) or FOR_LOOP_POLL .search (cmd )):
205220 return None
206221 return (
207222 "Hand-rolled poll over pull-request state. Use "
208- "`pr-status.sh -R <owner/repo> <pr> --watch` instead: it returns at the "
223+ f"` { PR_STATUS } -R <owner/repo> <pr> --watch` instead: it returns at the "
209224 "FIRST actionable event — a check that failed, a review that arrived, a "
210225 "thread that needs an answer — where a loop written here waits for the "
211226 "one outcome it was told about and sleeps through the rest. A loop that "
@@ -243,13 +258,13 @@ def merge_readiness_without_pr_status(cmd: str) -> str | None:
243258 if QUERIES_FORGE .match (segment ) and MERGE_READINESS_FIELD .search (segment ):
244259 return (
245260 "Merge readiness asked of gh directly. Use "
246- "`pr-status.sh -R <owner/repo> <pr>` instead: it reports checks, "
261+ f"` { PR_STATUS } -R <owner/repo> <pr>` instead: it reports checks, "
247262 "reviews, rulesets and unresolved threads together and ends with "
248263 "a NEXT: line naming the action. mergeable_state and "
249264 "mergeStateStatus answer only 'blocked' and never say why, so an "
250265 "unresolved thread or a red check stays invisible and the pull "
251266 "request looks like it is merely waiting. To find out which "
252- "required context is unmet, run pr-status.sh first, then the "
267+ f "required context is unmet, run { PR_STATUS } first, then the "
253268 "GraphQL query with `isRequired` — that one is not gated."
254269 )
255270 return None
0 commit comments