From 3866ac17f3a6d0d1c91d9bcafb57dacab7b0adcf Mon Sep 17 00:00:00 2001 From: Christopher Hicks Date: Mon, 17 Nov 2025 07:54:26 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20[just]=20v3.9=20fixes=20shellcheck?= =?UTF-8?q?=20errors=20in=20gh-process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .just/gh-process.just | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.just/gh-process.just b/.just/gh-process.just index 679e32e..47f19a1 100644 --- a/.just/gh-process.just +++ b/.just/gh-process.just @@ -13,7 +13,7 @@ sync: git pull git status --porcelain # stp -# PR create 3.8 +# PR create v3.9 [group('Process')] pr: _has_commits && pr_checks #!/usr/bin/env bash @@ -36,14 +36,16 @@ pr: _has_commits && pr_checks FIRST_COMMIT_MESSAGE=$(git cherry -v "{{ release_branch }}" "$CURRENT_BRANCH" | sed -e 's/^[+] [0-9a-f]* //' | head -1) bodyfile=$(mktemp /tmp/justfile.XXXXXX) - echo "## Done" >> $bodyfile - echo "" >> $bodyfile - git cherry -v "{{ release_branch }}" "$CURRENT_BRANCH" | sed -e 's/^[+] [0-9a-f]* /- /' >> $bodyfile - echo "" >> $bodyfile - echo "" >> $bodyfile - echo "## Meta" >> $bodyfile - echo "" >> $bodyfile - echo "(Automated in \`.just/gh-process.just\`.)" >> $bodyfile + { + echo "## Done" + echo "" + git cherry -v "{{ release_branch }}" "$CURRENT_BRANCH" | sed -e 's/^[+] [0-9a-f]* /- /' + echo "" + echo "" + echo "## Meta" + echo "" + echo "(Automated in \`.just/gh-process.just\`.)" + } >> "$bodyfile" echo '' cat "$bodyfile" @@ -70,7 +72,7 @@ merge: _on_a_branch && sync [group('Process')] branch branchname: _main_branch #!/usr/bin/env bash - NOW=`just utcdate` + NOW=$(just utcdate) git checkout -b "$USER/$NOW-{{ branchname }}" # view PR in web browser @@ -140,12 +142,13 @@ pr_checks: echo "🐈‍⬛😾 Copilot suggestions..." PR_META=$(gh pr view --json number,headRepository,headRepositoryOwner) - PR_REPO_NAME=$(echo $PR_META | jq -r '.headRepository.name') - PR_REPO_OWNER=$(echo $PR_META | jq -r '.headRepositoryOwner.login') - PR_NUMBER=$(echo $PR_META | jq '.number') + PR_REPO_NAME=$(echo "$PR_META" | jq -r '.headRepository.name') + PR_REPO_OWNER=$(echo "$PR_META" | jq -r '.headRepositoryOwner.login') + PR_NUMBER=$(echo "$PR_META" | jq '.number') #echo "$PR_NUMBER $PR_REPO_OWNER/$PR_REPO_NAME" + # shellcheck disable=SC2016 gh api graphql \ - -F owner=$PR_REPO_OWNER -F name=$PR_REPO_NAME -F pr=$PR_NUMBER \ + -F owner="$PR_REPO_OWNER" -F name="$PR_REPO_NAME" -F pr="$PR_NUMBER" \ --jq '[ .data.repository.pullRequest.reviews.nodes.[] | select(.author.login=="copilot-pull-request-reviewer") | .comments.nodes.[] ]' \ -f query=' query($name: String!, $owner: String!, $pr: Int!) {