Problem
Surfaced during /idd-verify of #192 (regression lens, LOW — perf). See verify report: #192 (comment)
In idd-all Phase 0.5, the third-party detection (#192) issues gh api user + a dedicated gh repo view --json viewerPermission before the case "$PR_POLICY", in the IS_FORK=false branch. So:
gh api user fires on every non-fork idd-all invocation (incl. own-repo common path).
- When
pr_policy is explicitly always/never, the computed IS_THIRD_PARTY is discarded (those branches don't consult it) — the API calls are wasted.
Unlike idd-issue (which folds viewerPermission into the existing gh repo view), idd-all's fork check only requests isFork, so it pays a separate probe.
Proposed fix
Make third-party detection lazy in idd-all Phase 0.5: compute IS_THIRD_PARTY only inside the absent) case (the only branch that uses it). Optionally fold viewerPermission into the existing fork gh repo view call.
Refs #192.
Problem
Surfaced during
/idd-verifyof #192 (regression lens, LOW — perf). See verify report: #192 (comment)In
idd-allPhase 0.5, the third-party detection (#192) issuesgh api user+ a dedicatedgh repo view --json viewerPermissionbefore thecase "$PR_POLICY", in theIS_FORK=falsebranch. So:gh api userfires on every non-forkidd-allinvocation (incl. own-repo common path).pr_policyis explicitlyalways/never, the computedIS_THIRD_PARTYis discarded (those branches don't consult it) — the API calls are wasted.Unlike
idd-issue(which foldsviewerPermissioninto the existinggh repo view),idd-all's fork check only requestsisFork, so it pays a separate probe.Proposed fix
Make third-party detection lazy in
idd-allPhase 0.5: computeIS_THIRD_PARTYonly inside theabsent)case (the only branch that uses it). Optionally foldviewerPermissioninto the existing forkgh repo viewcall.Refs #192.