Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions .just/gh-process.just
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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!) {
Expand Down
Loading