Skip to content

Commit 3866ac1

Browse files
committed
✅ [just] v3.9 fixes shellcheck errors in gh-process
1 parent 728e042 commit 3866ac1

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

.just/gh-process.just

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sync:
1313
git pull
1414
git status --porcelain # stp
1515

16-
# PR create 3.8
16+
# PR create v3.9
1717
[group('Process')]
1818
pr: _has_commits && pr_checks
1919
#!/usr/bin/env bash
@@ -36,14 +36,16 @@ pr: _has_commits && pr_checks
3636
FIRST_COMMIT_MESSAGE=$(git cherry -v "{{ release_branch }}" "$CURRENT_BRANCH" | sed -e 's/^[+] [0-9a-f]* //' | head -1)
3737

3838
bodyfile=$(mktemp /tmp/justfile.XXXXXX)
39-
echo "## Done" >> $bodyfile
40-
echo "" >> $bodyfile
41-
git cherry -v "{{ release_branch }}" "$CURRENT_BRANCH" | sed -e 's/^[+] [0-9a-f]* /- /' >> $bodyfile
42-
echo "" >> $bodyfile
43-
echo "" >> $bodyfile
44-
echo "## Meta" >> $bodyfile
45-
echo "" >> $bodyfile
46-
echo "(Automated in \`.just/gh-process.just\`.)" >> $bodyfile
39+
{
40+
echo "## Done"
41+
echo ""
42+
git cherry -v "{{ release_branch }}" "$CURRENT_BRANCH" | sed -e 's/^[+] [0-9a-f]* /- /'
43+
echo ""
44+
echo ""
45+
echo "## Meta"
46+
echo ""
47+
echo "(Automated in \`.just/gh-process.just\`.)"
48+
} >> "$bodyfile"
4749

4850
echo ''
4951
cat "$bodyfile"
@@ -70,7 +72,7 @@ merge: _on_a_branch && sync
7072
[group('Process')]
7173
branch branchname: _main_branch
7274
#!/usr/bin/env bash
73-
NOW=`just utcdate`
75+
NOW=$(just utcdate)
7476
git checkout -b "$USER/$NOW-{{ branchname }}"
7577

7678
# view PR in web browser
@@ -140,12 +142,13 @@ pr_checks:
140142

141143
echo "🐈‍⬛😾 Copilot suggestions..."
142144
PR_META=$(gh pr view --json number,headRepository,headRepositoryOwner)
143-
PR_REPO_NAME=$(echo $PR_META | jq -r '.headRepository.name')
144-
PR_REPO_OWNER=$(echo $PR_META | jq -r '.headRepositoryOwner.login')
145-
PR_NUMBER=$(echo $PR_META | jq '.number')
145+
PR_REPO_NAME=$(echo "$PR_META" | jq -r '.headRepository.name')
146+
PR_REPO_OWNER=$(echo "$PR_META" | jq -r '.headRepositoryOwner.login')
147+
PR_NUMBER=$(echo "$PR_META" | jq '.number')
146148
#echo "$PR_NUMBER $PR_REPO_OWNER/$PR_REPO_NAME"
149+
# shellcheck disable=SC2016
147150
gh api graphql \
148-
-F owner=$PR_REPO_OWNER -F name=$PR_REPO_NAME -F pr=$PR_NUMBER \
151+
-F owner="$PR_REPO_OWNER" -F name="$PR_REPO_NAME" -F pr="$PR_NUMBER" \
149152
--jq '[ .data.repository.pullRequest.reviews.nodes.[] | select(.author.login=="copilot-pull-request-reviewer") | .comments.nodes.[] ]' \
150153
-f query='
151154
query($name: String!, $owner: String!, $pr: Int!) {

0 commit comments

Comments
 (0)