Skip to content

Commit

Permalink
fix: upstream tracker multiline handling (#651)
Browse files Browse the repository at this point in the history
* fix: multiline handling

* fix: closed_at
  • Loading branch information
aalu1418 authored Apr 2, 2024
1 parent c1fd2e6 commit 6591f53
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/upstream-tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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<<EOF" >> $GITHUB_OUTPUT
echo "$OPEN" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "closed<<EOF" >> $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}}'

0 comments on commit 6591f53

Please sign in to comment.