Skip to content

Commit

Permalink
only check ref head
Browse files Browse the repository at this point in the history
  • Loading branch information
caelean committed Dec 9, 2024
1 parent 474b97f commit 6816ad1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions python/tach/filesystem/git_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ def _get_branch_name(repo: Repo) -> str:
except TypeError as e:
# GHA uses a detached HEAD / shallow clone in actions/checkout@v4, get the branch name from env
if is_github_actions():
repo_name = os.environ.get("GITHUB_HEAD_REF") or os.environ.get(
"GITHUB_REF_NAME"
)
repo_name = os.environ.get("GITHUB_HEAD_REF")
if not repo_name:
raise e
else:
Expand Down

0 comments on commit 6816ad1

Please sign in to comment.