Skip to content

idd-all Phase 0.5: make third-party detection lazy (skip gh api user/probe for explicit always/never) #196

Description

@kiki830621

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions