From 6591f53e1897cc58123bb2fc2d13377646d7ffe7 Mon Sep 17 00:00:00 2001 From: Aaron Lu <50029043+aalu1418@users.noreply.github.com> Date: Mon, 1 Apr 2024 23:21:48 -0600 Subject: [PATCH] fix: upstream tracker multiline handling (#651) * fix: multiline handling * fix: closed_at --- .github/workflows/upstream-tracker.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/upstream-tracker.yml b/.github/workflows/upstream-tracker.yml index 4c068f603..9b155ed02 100644 --- a/.github/workflows/upstream-tracker.yml +++ b/.github/workflows/upstream-tracker.yml @@ -17,17 +17,22 @@ jobs: # OPEN=$(curl https://api.github.com/repos/solana-foundation/solana-improvement-documents/pulls\?state\=open\&per_page\=100 | jq --arg t "$(date -v-7d +%s)" -r '.[] | select (.created_at | . == null or fromdateiso8601 > ($t|tonumber)) | "- \(.html_url)"') # closed PRs - CLOSED=$(curl https://api.github.com/repos/solana-foundation/solana-improvement-documents/pulls\?state=closed\&per_page=100 | jq --arg t "$(date -d '7 days ago' +%s)" -r '.[] | select (.created_at | . == null or fromdateiso8601 > ($t|tonumber)) | "- \(.html_url)"') + CLOSED=$(curl https://api.github.com/repos/solana-foundation/solana-improvement-documents/pulls\?state=closed\&per_page=100 | jq --arg t "$(date -d '7 days ago' +%s)" -r '.[] | select (.closed_at | . == null or fromdateiso8601 > ($t|tonumber)) | "- \(.html_url)"') # macos # CLOSED=$(curl https://api.github.com/repos/solana-foundation/solana-improvement-documents/pulls\?state\=closed\&per_page\=100 | jq --arg t "$(date -v-7d +%s)" -r '.[] | select (.created_at | . == null or fromdateiso8601 > ($t|tonumber)) | "- \(.html_url)"') - echo "open=$OPEN" >> "$GITHUB_OUTPUT" - echo "closed=$CLOSED" >> "$GITHUB_OUTPUT" + echo "open<> $GITHUB_OUTPUT + echo "$OPEN" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + echo "closed<> $GITHUB_OUTPUT + echo "$CLOSED" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT - uses: actions/checkout@v3 if: steps.updates.outputs.open || steps.updates.outputs.closed - name: Open Issue if: steps.updates.outputs.open || steps.updates.outputs.closed env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # TODO: update tagged to team + # TODO: update assignee to teams when GH supports it run: gh issue create -a aalu1418 -t "SIMD Updates - $(date)" -l "[auto] SIMD Updates" -b $'## Opened\n${{ steps.updates.outputs.open}}\n\n## Closed\n${{ steps.updates.outputs.closed}}'