Skip to content

GitHub token fallback chain (gh auth token) #65

@erishforG

Description

@erishforG

Summary

When PARSEC_GITHUB_TOKEN is unset, PR creation fails with 401. However, a valid token may be available via gh auth token.

Proposed Solution

Token resolution priority:

  1. PARSEC_GITHUB_TOKEN
  2. GITHUB_TOKEN
  3. GH_TOKEN
  4. gh auth token command output (fallback, only when gh CLI is installed)

Context

Token existed in ~/.claude/.atlassian-env but wasn't loaded in the session → parsec 401 → gh CLI worked fine via its own auth

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions