File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,16 @@ command_v gh || install_gh
54
54
cd " $INPUT_PATH " || report_failure " Could not change to input_path ($INPUT_PATH )"
55
55
SENDER=$( jq -r .sender.login " $GITHUB_EVENT_PATH " )
56
56
USER_JSON=$( mktemp)
57
- gh api " /users/$SENDER " > " $USER_JSON "
57
+ (
58
+ gh api " /users/$SENDER " ||
59
+ curl -s " $GITHUB_API_URL /users/$SENDER " ||
60
+ echo ' {"id": 0, "login": "unknown"}'
61
+ ) > " $USER_JSON "
58
62
export GIT_AUTHOR_NAME=$( jq -r .name " $USER_JSON " )
59
63
export GIT_AUTHOR_EMAIL=$( jq -r ' .email // empty' " $USER_JSON " )
64
+ if [ -z " $GIT_AUTHOR_NAME " ]; then
65
+ GIT_AUTHOR_NAME=" $GITHUB_ACTOR "
66
+ fi
60
67
if [ -z " $GIT_AUTHOR_EMAIL " ]; then
61
68
GIT_AUTHOR_EMAIL=$( jq -r ' .pusher.email // empty' " $GITHUB_EVENT_PATH " )
62
69
if [ -z " $GIT_AUTHOR_EMAIL " ]; then
You can’t perform that action at this time.
0 commit comments