File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 81
81
do
82
82
commit="${commit_file%.*}"
83
83
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
85
94
title="Performance Shift(s): \`$commit\`"
86
95
body="
87
96
Benchmark comparison has identified performance shifts at commit \
You can’t perform that action at this time.
0 commit comments