Commit Information
Displaying Commit Information on Currents
Currents client SDKs use a set of git
commands to obtain git commit information. This information is being used to display Run Details and enable certain platform features, for example
show analytics filtered by branch flakiness
searching items based on commit message
integration with SVC providers
If no commit information is available either from.git
folder or from environment variables, no commit data will be shown in the dashboard.
Commit information must be available for Bitbucket, GitHub and GitLab integrations (PR comments, commit status updates).
Currents uses the following information:
Run Title
Commit message
Branch Link
Git origin + branch name
Commit Link
Git origin + commit SHA
Author
Commit author
Git Commands
Currents uses the following commands to get the commit data (see src/git-api.js):
git branch:
git rev-parse --abbrev-ref HEAD
commit message:
git show -s --pretty=%B
commit author email:
git show -s --pretty=%ae
commit author name:
git show -s --pretty=%an
commit SHA:
git show -s --pretty=%H
git origin:
git config --get remote.origin.url
GitHub Actions and Pull Requests
Currents automatically detects PR information, including PR title and the target branch when running in GitHub Actions as a result of pull_request
GHA event. When a Pull Request is detected, Currents uses the following Pull Request data instead of the commit information.
Run Title
Pull Request title
Commit Link
Pull Request discussion link
Commit SHA
Source branch latest commit SHA
You can change this behavior in Project Settings.
Overriding Commit Info
You can override the commit info by manually setting environment variables:
For example, if .git
directory isn't available on the CI machine and the commands mentioned above return no value, you can set the environment variables explicitly. This method can be helpful for non-traditional setups, for example:
tests repo is different from application source code repo and you want to show the source code commit details in the dashboard
manual CI pipeline invocation
local testing
Troubleshooting Commit Info
If you're not seeing git information for your runs, most chances .git
directory is not available in the CI environment and Currents can't detect the commit information automatically.
Run the Git Commands as part of your CI jobs manually and capture the output
Use the environment variables from Overriding Commit Info section
Enable the corresponding client SDK debug mode (Playwright or Cypress)
Contact our support channels for assistance
Last updated