Skip to content

Commit a29f375

Browse files
committed
Replace curl w/ gh api
1 parent 6274427 commit a29f375

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ runs:
4141
INPUT_HEAD_REF: ${{ inputs.head_ref }}
4242
INPUT_PATH: ${{ inputs.path }}
4343
INPUT_DO_NOT_REPORT: ${{ inputs.do_not_report }}
44+
GH_TOKEN: ${{ github.token }}
4445
run: ${{ github.action_path }}/merge

merge

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ report_failure() {
1212
cd "$INPUT_PATH" || report_failure "Could not change to input_path ($INPUT_PATH)"
1313
SENDER=$(jq -r .sender.login "$GITHUB_EVENT_PATH")
1414
USER_JSON=$(mktemp)
15-
curl -s "$GITHUB_API_URL/users/$SENDER" -o "$USER_JSON"
15+
gh api "/users/$SENDER" > "$USER_JSON"
1616
export GIT_AUTHOR_NAME=$(jq -r .name "$USER_JSON")
1717
export GIT_AUTHOR_EMAIL=$(jq -r '.email // empty' "$USER_JSON")
1818
if [ -z "$GIT_AUTHOR_EMAIL" ]; then

0 commit comments

Comments
 (0)