Commit data for GitHub Actions
How to get correct git commit information when using GitHub Actions
GitHub Pull Request Title, Issue Link and Branch Name
The recent (Jan 30, 2024) releases of @currents/playwright@0.12.0 and cypress-cloud@1.10.0 handles git information better when running in GitHub Actions triggered by `pull_request` trigger.
PR title becomes Run Title (instead of a generic message PR #XX)
Effective Branch becomes the PR HEAD branch name - allowing more meaningful usage in analytics and notification filters
UI displays a direct link to GitHub Pull Request issue

Merge commit in pull request runs
On pull_request events, actions/checkout checks out a merge commit that GitHub creates by merging the pull request into the base branch. Its message looks like this:
The reporter detects the merge commit and records the last commit of the pull request instead: its SHA, message, author and timestamp.
With the default actions/checkout settings, the clone has only the merge commit, so the reporter fetches the pull request commit:
The fetch uses the credentials that actions/checkout stores in the clone, and times out after 3 seconds. If it fails, the run shows the merge commit's message and author, as with earlier versions. For example, the fetch fails in a private repository checked out with persist-credentials: false. The commit SHA and branch still come from the pull request, so PR comments and commit statuses are not affected.
To turn the fetch off, set CURRENTS_DISABLE_HEAD_COMMIT_FETCH=true. See Commit Information for other CI providers.
Earlier versions and Cypress
With cypress-cloud and earlier versions of the reporters, runs show the merge commit's message and author. To record the last commit of the pull request, check out that commit:
The workflow then tests the last commit of the pull request, not the result of merging it into the base branch. It does not catch conflicts or failures that appear only after the merge.
Last updated
Was this helpful?