This broke linting because the code did not take into account that HEAD may not point to a branch - it could be in a detached state. And this commonly occurs in Github Actions when @actions/checkout is used to clone a repository.
If we are not currently in a branch, then we:
Infer remote name from the config key clone.defaultRemoteName
If that config key is not set, then the value is defaulted to 'origin' (the original default)
These fixes were tested in this PR (and this PR), which had CI config like:
From this comment in the referrenced issue:
If we are not currently in a branch, then we:
clone.defaultRemoteName
These fixes were tested in this PR (and this PR), which had CI config like:
Fixes #172