From d5981d7b08ed3878e1a883643f0dfcf2bd08eabf Mon Sep 17 00:00:00 2001 From: Aaron Lu <50029043+aalu1418@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:23:17 -0600 Subject: [PATCH] upstream tracker: agave release schedules + feature gates (#782) * upstream tracker: agave release schedules + feature gates * ignore lint --- .github/workflows/upstream-tracker.yml | 38 +++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/.github/workflows/upstream-tracker.yml b/.github/workflows/upstream-tracker.yml index 565f9ebfc..806dd5568 100644 --- a/.github/workflows/upstream-tracker.yml +++ b/.github/workflows/upstream-tracker.yml @@ -5,7 +5,7 @@ on: - cron: '0 0 * * 1' # check monday at midnight UTC jobs: - SIMD-Update-Checker: + Solana-Update-Checker: runs-on: ubuntu-latest steps: - name: Check For Updates In Past Week @@ -21,6 +21,16 @@ jobs: # 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)"') + # updates to anza-xyz/agave wiki (contains feature gate updates + release schedules) + git clone https://github.com/anza-xyz/agave.wiki.git + cd agave.wiki + WIKILOGS="$(git log --since="7 days ago" --reverse --pretty=format:'{"commit":"%H","author":"%aN <%aE>","date":"%ad","message":"%f"}')" + WIKILOGS="[${WIKILOGS//$'\n'/,}]" # proper JSON formatting + WIKIRANGE="$(echo $WIKILOGS | jq -r '"\(.[0].commit)^..\(.[-1].commit)"')" + WIKI="$(git diff $WIKIRANGE)" + WIKI="${WIKI//$'\n'/\\n}" # preserve new line + printf -v WIKI "%q " "$WIKI" # escape chars that may cause issues + echo "open<> $GITHUB_OUTPUT echo "$OPEN" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT @@ -28,11 +38,31 @@ jobs: echo "closed<> $GITHUB_OUTPUT echo "$CLOSED" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT + + echo "wiki<> $GITHUB_OUTPUT + echo "$WIKI" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + echo "wikirange=$WIKIRANGE" >> $GITHUB_OUTPUT - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - if: steps.updates.outputs.open || steps.updates.outputs.closed + if: steps.updates.outputs.open || steps.updates.outputs.closed || steps.updates.outputs.wiki - name: Open Issue - if: steps.updates.outputs.open || steps.updates.outputs.closed + if: steps.updates.outputs.open || steps.updates.outputs.closed || steps.updates.outputs.wiki env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 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}}' + run: | + { + echo "## SIMD"; + echo "### Opened"; + echo "${{ steps.updates.outputs.open }}"; + echo "### Closed"; + echo "${{ steps.updates.outputs.closed }}"; + echo "## Agave Wiki"; + echo "[${{ steps.updates.outputs.wikirange }}](https://github.com/anza-xyz/agave/wiki/_compare/${{steps.updates.outputs.wikirange }})"; + echo "\`\`\`diff"; + # shellcheck disable=SC1003 + echo -e "${{ steps.updates.outputs.wiki }}" | tr -d '\'; # unescape + remove remaining backticks + echo "\`\`\`"; + } >> output.md + + gh issue create -a aalu1418 -t "Upstream Updates - $(date)" -l "[auto] Upstream Updates" -F output.md