Skip to content

Commit 45f188b

Browse files
authored
Overnight benchmarks - find a valid issue assignee (#4627)
* Overnight benchmarks find a valid issue assignee. * Overnight benchmarks safer check for a valid issue assignee.
1 parent ad17088 commit 45f188b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/benchmark.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,16 @@ jobs:
8181
do
8282
commit="${commit_file%.*}"
8383
pr_number=$(git log "$commit"^! --oneline | grep -o "#[0-9]*" | tail -1 | cut -c 2-)
84-
assignee=$(gh pr view $pr_number --json author -q '.["author"]["login"]' --repo $GITHUB_REPOSITORY)
84+
author=$(gh pr view $pr_number --json author -q '.["author"]["login"]' --repo $GITHUB_REPOSITORY)
85+
merger=$(gh pr view $pr_number --json mergedBy -q '.["mergedBy"]["login"]' --repo $GITHUB_REPOSITORY)
86+
# Find a valid assignee from author/merger/nothing.
87+
if curl -s https://api.github.com/users/$author | grep -q "login"; then
88+
assignee=$author
89+
elif curl -s https://api.github.com/users/$merger | grep -q "login"; then
90+
assignee=$merger
91+
else
92+
assignee=""
93+
fi
8594
title="Performance Shift(s): \`$commit\`"
8695
body="
8796
Benchmark comparison has identified performance shifts at commit \

0 commit comments

Comments
 (0)