You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The status command today depends on libgit2 get_repository_head in order to find the current branch name. However, it does not support detached head (there is a get_repository_head_detached for that but a detached head does not point to a branch so this does not help) and errors with "reference 'HEAD' is neither a local nor a remote branch." Unfortunately, the GitHub checkout action intentionally creates a detached head when checking out for a pull request, meaning that we cannot find the branch name by simply looking at HEAD.
There is a work-around described here actions/checkout#124 (comment) which probably works (doing git checkout ${{ github.head_ref }} between checkout action and gitops-promotion status action seems to resolve the issue. However, I'm thinking the correct fix for this is to require the caller to provide the branch name when calling status. Opinions?
The text was updated successfully, but these errors were encountered:
The status command today depends on libgit2 get_repository_head in order to find the current branch name. However, it does not support detached head (there is a
get_repository_head_detached
for that but a detached head does not point to a branch so this does not help) and errors with "reference 'HEAD' is neither a local nor a remote branch." Unfortunately, the GitHub checkout action intentionally creates a detached head when checking out for a pull request, meaning that we cannot find the branch name by simply looking at HEAD.There is a work-around described here actions/checkout#124 (comment) which probably works (doing
git checkout ${{ github.head_ref }}
between checkout action and gitops-promotion status action seems to resolve the issue. However, I'm thinking the correct fix for this is to require the caller to provide the branch name when calling status. Opinions?The text was updated successfully, but these errors were encountered: