isFineGrainedGitHubPat function

bool isFineGrainedGitHubPat(
  1. String token
)

Whether token is a GitHub fine-grained PAT (v2, github_pat_…). Per the official Copilot CLI docs this IS a supported Copilot credential — but only with the "Copilot Requests" permission, so the connect flow uses this to print an informational hint at paste time (the exchange itself decides).

Implementation

bool isFineGrainedGitHubPat(String token) => token.startsWith('github_pat_');