mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-28 18:24:17 -05:00
go-gh reads gh's config file once per process and answers from that snapshot for the rest of the process's life. gh rewrites the file whenever the active account changes, and stores the active account's token either in it or in the system keyring, depending on the account. A lazygit that has been running for a while therefore consults a snapshot that no longer describes reality: it either keeps using a token for an account that is no longer active, or, when the snapshot was taken while a keyring-backed account was active, finds no token at all and silently stops showing pull requests until it is restarted. Asking gh resolves the token afresh on every refresh, from whichever of the environment, the keyring or the config file currently holds it. go-gh's lookup stays behind as a fallback for setups without the gh binary, where it still picks up GH_TOKEN and friends. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>