Skip to content

GitHub tokens

Every card but WakaTime reads the GitHub API, which needs a personal access token. The cards only read, so a classic token with no scopes draws every card about a user, a repository or a gist.

A workflow’s own GITHUB_TOKEN is scoped to its repository, so it cannot draw the user or gist cards; the organization cards are in the table below.

Organization data is granted separately from personal data, so a token that draws your stats card need not draw these.

TokenOrganizationOrganization activity
Classic PATno scopes; read:org for show=membersthe repo scope
Fine-grained PATthe organization as resource owner, which it approves; Members: Read for show=membersthe same, with Issues: Read
GitHub App installationthe app installed on the organization; the Members permission for show=membersthe same, with the Issues permission
Actions GITHUB_TOKENcannot read the member countissues: read in the workflow’s permissions:

A stat the token cannot read draws an error naming the permission and the option that drops it, rather than a card missing the row: drop members from the organization card’s show, or hide=issues_opened,issues_closed on the activity card.

PAT_1, PAT_2, … are used in rotation: when one is rate limited or rejected, the card moves to the next, so a second token doubles what you can draw. It matters most for the stats card, whose extra stats each cost a request. When GitHub rejects every one, the card reads Every GitHub API token was rejected.

A token never belongs spelled out in a command you type: it lands in your shell history.

Drawing withWhere the token goes
The actiona repository secret, as its README shows
The CLI in a workflowa repository secret, as in Keeping it current
The CLIthe environment, a .env file or the prompt: see A token
Your own serveran env file or a secret manager: see Where the token lives
The libraryCardConfig’s pats: see Configuring a deployment

A token is never logged; the name of the variable it came from is, so a failing one can be found.