This version contains a potentially breaking change for repos that are using Happo via GitHub actions. These changes were originally released as v12.4.1 and v12.4.2, but were reverted in v12.4.3 when they were discovered to be potentially breaking. There are no other changes.
This release fixes an issue where the baseline commit was inconsistently resolved when using Happo in GitHub actions. If you are using a non-zero fetch-depth
with the checkout action, this version may result in an error like the following:
Error: Command failed: git merge-base origin/main HEAD
fatal: Not a valid object name origin/main
To update to this version, you will need to make sure that your default branch can be accessed via git
in your workflow.
One option is to set fetch-depth: 0
in your checkout action, so that the whole repo is checked out:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
fetch-depth: 0
Although this may come with a performance cost, especially for larger repos. Alternatively, you can stick with a non-zero fetch-depth and add a step to fetch your repo's default branch from origin
like this:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
fetch-depth: 100
- name: Fetch main branch
if: github.ref != 'refs/heads/main'
run: git fetch origin main:main
What's Changed
- Revert changes from 12.4.1 and 12.4.2 by @lencioni in #349
- Re-apply changes from v12.4.1 and v12.4.2 by @lencioni in #350
Full Changelog: v12.4.2...v13.0.0