If by mistake, one forgets to use fetch-depth: 0 with actions/checkout@v4, the action redhat-plumbers-in-action/differential-shellcheck@v5 will be unable to find the needed diff but will carry on:
Run actions/checkout@v4
Syncing repository: canonical/lxd-ci
Getting Git version info
Temporarily overriding HOME='/home/runner/work/_temp/909f679f-99cb-4e64-907a-ebed4d65f581' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/lxd-ci/lxd-ci
Deleting the contents of '/home/runner/work/lxd-ci/lxd-ci'
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
Determining the checkout info
Checking out the ref
/usr/bin/git log -1 --format='%H'
'35edb903e0835de501914bb32133d88136bcbef1'
Omitting that force-depth: 0 is quite easy and considering that action/checkout changed the default in their v4 it feels safe to have some more safeguard in this action.
Describe the solution you'd like
IMHO, this fatal: Invalid revision range <commit..commit> error should cause the whole action to return an error.
Type of issue
Bug Report
Description
If by mistake, one forgets to use
fetch-depth: 0
withactions/checkout@v4
, the actionredhat-plumbers-in-action/differential-shellcheck@v5
will be unable to find the needed diff but will carry on:Those logs are from https://github.com/canonical/lxd-ci/actions/runs/8756699425/job/24033740622?pr=155#step:5:13
Omitting that
force-depth: 0
is quite easy and considering thataction/checkout
changed the default in theirv4
it feels safe to have some more safeguard in this action.Describe the solution you'd like
IMHO, this
fatal: Invalid revision range <commit..commit>
error should cause the whole action to return an error.