Skip to content

Commit 570572f

Browse files
authored
Fix wrong branch name handling fork PR (#48)
* Fix wrong branch name when uploading PR results Signed-off-by: Huy Do <huydhn@gmail.com> * [no ci] Does this work? Signed-off-by: Huy Do <huydhn@gmail.com> * [no ci] Ready for review Signed-off-by: Huy Do <huydhn@gmail.com> --------- Signed-off-by: Huy Do <huydhn@gmail.com>
1 parent ae3716e commit 570572f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/scripts/upload_benchmark_results.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python3
22

3+
import itertools
34
import requests
45
import glob
56
import gzip
@@ -133,7 +134,7 @@ def get_git_metadata(repo_dir: str) -> Tuple[str, str]:
133134
)
134135
except TypeError as e:
135136
# This is a detached HEAD, try to find out where the commit comes from
136-
for head in repo.heads:
137+
for head in itertools.chain(repo.heads, repo.refs):
137138
info(f"Check commits from {head.name}")
138139
for commit in repo.iter_commits(head):
139140
if commit.hexsha == hexsha:

0 commit comments

Comments
 (0)