Skip to content

CI variables

The reporter auto-detects run metadata from CI environment variables, falling back to generic variables and then git. This page lists every variable it reads, per provider. For the narrative version, see CI integration.

For each field (commit, branch, PR, run id, run URL, author):

  1. CI-specific variable (tables below)
  2. Generic variable (GIT_*, BRANCH, COMMIT_SHA, …)
  3. git shell-out (git log / git rev-parse)
  4. Empty (branch left unset → dashboard shows “No Branch Info”)
FieldVariable
CommitGITHUB_SHA
BranchGITHUB_REF_NAME / GITHUB_HEAD_REF
Run idGITHUB_RUN_ID
RepositoryGITHUB_REPOSITORY
Server URLGITHUB_SERVER_URL

GitHub doesn’t expose a commit-author email → falls back to git.

FieldVariable
CommitCI_COMMIT_SHA
BranchCI_COMMIT_REF_NAME
Pipeline idCI_PIPELINE_ID
PR (MR) idCI_MERGE_REQUEST_IID
Author emailGITLAB_USER_EMAIL
Author nameGITLAB_USER_NAME / CI_COMMIT_AUTHOR
FieldVariable
CommitCIRCLE_SHA1
BranchCIRCLE_BRANCH
Build #CIRCLE_BUILD_NUM
PRCIRCLE_PULL_REQUEST
Build URLCIRCLE_BUILD_URL

CircleCI doesn’t expose a commit-author email → falls back to git.

FieldVariable
CommitBITBUCKET_COMMIT
BranchBITBUCKET_BRANCH
PR idBITBUCKET_PR_ID
Build #BITBUCKET_BUILD_NUMBER
RepositoryBITBUCKET_REPO_FULL_NAME
Origin URLBITBUCKET_GIT_HTTP_ORIGIN

Bitbucket doesn’t expose a commit-author email → falls back to git.

Set these on unsupported providers and the reporter picks them up:

FieldVariable
CommitCOMMIT_SHA
BranchBRANCH
Run idCI_RUN_ID
Run URLCI_URL

When no CI or generic variables are set, the reporter resolves commit/branch/author from the local repository via git log -1, git rev-parse, and git config user.email/user.name — so even local runs are attributed.