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.
Resolution order
Section titled “Resolution order”For each field (commit, branch, PR, run id, run URL, author):
- CI-specific variable (tables below)
- Generic variable (
GIT_*,BRANCH,COMMIT_SHA, …) gitshell-out (git log/git rev-parse)- Empty (branch left unset → dashboard shows “No Branch Info”)
GitHub Actions
Section titled “GitHub Actions”| Field | Variable |
|---|---|
| Commit | GITHUB_SHA |
| Branch | GITHUB_REF_NAME / GITHUB_HEAD_REF |
| Run id | GITHUB_RUN_ID |
| Repository | GITHUB_REPOSITORY |
| Server URL | GITHUB_SERVER_URL |
GitHub doesn’t expose a commit-author email → falls back to git.
GitLab CI
Section titled “GitLab CI”| Field | Variable |
|---|---|
| Commit | CI_COMMIT_SHA |
| Branch | CI_COMMIT_REF_NAME |
| Pipeline id | CI_PIPELINE_ID |
| PR (MR) id | CI_MERGE_REQUEST_IID |
| Author email | GITLAB_USER_EMAIL |
| Author name | GITLAB_USER_NAME / CI_COMMIT_AUTHOR |
CircleCI
Section titled “CircleCI”| Field | Variable |
|---|---|
| Commit | CIRCLE_SHA1 |
| Branch | CIRCLE_BRANCH |
| Build # | CIRCLE_BUILD_NUM |
| PR | CIRCLE_PULL_REQUEST |
| Build URL | CIRCLE_BUILD_URL |
CircleCI doesn’t expose a commit-author email → falls back to git.
Bitbucket Pipelines
Section titled “Bitbucket Pipelines”| Field | Variable |
|---|---|
| Commit | BITBUCKET_COMMIT |
| Branch | BITBUCKET_BRANCH |
| PR id | BITBUCKET_PR_ID |
| Build # | BITBUCKET_BUILD_NUMBER |
| Repository | BITBUCKET_REPO_FULL_NAME |
| Origin URL | BITBUCKET_GIT_HTTP_ORIGIN |
Bitbucket doesn’t expose a commit-author email → falls back to git.
Generic (any CI)
Section titled “Generic (any CI)”Set these on unsupported providers and the reporter picks them up:
| Field | Variable |
|---|---|
| Commit | COMMIT_SHA |
| Branch | BRANCH |
| Run id | CI_RUN_ID |
| Run URL | CI_URL |
Git fallback
Section titled “Git fallback”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.
Re-run overrides
Section titled “Re-run overrides”These are set for you by nijam-... fetch-failed --export-env (see
Re-run only failed tests); you rarely set them by hand. The reporter reads
them so a “re-run only the failures” retry clubs under the original run.
| Variable | Read by | Effect |
|---|---|---|
NIJAM_RUN_GROUP | reporter | Overrides the detected CI run id, so the retry clubs under the original |
NIJAM_RUN_ATTEMPT | reporter | Overrides the attempt number, so the retry is a distinct attempt |
NIJAM_RERUN | reporter | Marks the run a partial re-run (tagged “failed only” in the dashboard) |
NIJAM_TEST_NAME_PATTERN | you (Vitest) | The -t regex fetch-failed exports to filter Vitest to the failures |