From e03c61529ae125dac5f0ae871825342b2a8437e8 Mon Sep 17 00:00:00 2001 From: James Douglass Date: Mon, 6 Nov 2023 15:15:24 -0800 Subject: [PATCH] Updating the hub cli to use gh instead. RE:#1445 --- .github/workflows/auto-pr-from-main-into-releases.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto-pr-from-main-into-releases.yml b/.github/workflows/auto-pr-from-main-into-releases.yml index 7add9a54aa..905a649837 100644 --- a/.github/workflows/auto-pr-from-main-into-releases.yml +++ b/.github/workflows/auto-pr-from-main-into-releases.yml @@ -39,7 +39,7 @@ jobs: PR_NUM=$(git log -1 --pretty=%B main | head -n1 | egrep -o '#[1-9][0-9]*' | sed 's|#||g') # Get the username of the person who opened up the last PR into `main`. - PR_USERNAME=$(hub pr show -f "%au" $PR_NUM) + PR_USERNAME=$(gh pr view --json author $PR_NUM | jq -j '.author.login') echo "Latest PR on main ($PR_NUM) was authored by $PR_USERNAME." if [ "$PR_USERNAME" = "github-actions" ] @@ -70,13 +70,13 @@ jobs: # This PR will be assigned to $GITHUB_ACTOR, which should be # the person who merged the PR that caused this commit to be # created. Others could of course be assigned later. - hub pull-request \ + gh pr create \ --head $GITHUB_REPOSITORY:$SOURCE_BRANCH \ --base $GITHUB_REPOSITORY:$RELEASE_BRANCH \ --reviewer "$PR_USERNAME" \ - --assign "$PR_USERNAME" \ - --labels "auto" \ - --file $PR_BODY_FILE || ERRORSPRESENT=$(($ERRORSPRESENT | $?)) + --assignee "$PR_USERNAME" \ + --label "auto" \ + --body-file $PR_BODY_FILE || ERRORSPRESENT=$(($ERRORSPRESENT | $?)) done if [[ $ERRORSPRESENT -gt 0 ]]