diff --git a/.github/workflows/upstream-tracker.yml b/.github/workflows/upstream-tracker.yml index 4c068f603..f3959be5e 100644 --- a/.github/workflows/upstream-tracker.yml +++ b/.github/workflows/upstream-tracker.yml @@ -12,17 +12,22 @@ jobs: id: updates run: | # new PRs - OPEN=$(curl https://api.github.com/repos/solana-foundation/solana-improvement-documents/pulls\?state=open\&per_page=100 | jq --arg t "$(date -d '7 days ago' +%s)" -r '.[] | select (.created_at | . == null or fromdateiso8601 > ($t|tonumber)) | "- \(.html_url)"') - # macos - # 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)"') + { + echo 'open< ($t|tonumber)) | "- \(.html_url)"' + # macos + # 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)"' + echo EOF + } >> "$GITHUB_ENV" # 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)"') - # 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 'JSON_RESPONSE< ($t|tonumber)) | "- \(.html_url)"' + # macos + # 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 EOF + } >> "$GITHUB_ENV" - uses: actions/checkout@v3 if: steps.updates.outputs.open || steps.updates.outputs.closed - name: Open Issue