From e6af23a1ca4316654cb851ecdbe65a836ba35247 Mon Sep 17 00:00:00 2001 From: Elizabeth Worstell Date: Tue, 27 Aug 2024 12:26:40 -0400 Subject: [PATCH] chore: make roadmap issues mini dashboards --- .github/workflows/workflow-roadmap.yml | 39 ++++- ...-workflow-issue => update-dashboard-issue} | 9 ++ scripts/update-roadmap-issues | 140 ++++++++++++++++++ 3 files changed, 185 insertions(+), 3 deletions(-) rename scripts/{update-workflow-issue => update-dashboard-issue} (94%) create mode 100755 scripts/update-roadmap-issues diff --git a/.github/workflows/workflow-roadmap.yml b/.github/workflows/workflow-roadmap.yml index f72106e425..22c4756d45 100644 --- a/.github/workflows/workflow-roadmap.yml +++ b/.github/workflows/workflow-roadmap.yml @@ -1,4 +1,4 @@ -name: Update roadmap issue #728 +name: Update roadmap issues on: issues: types: @@ -25,7 +25,7 @@ concurrency: group: ${{ github.ref }}-workflow-roadmap cancel-in-progress: true jobs: - update-workflow-issue: + update-dashboard-issue: runs-on: ubuntu-latest permissions: issues: write @@ -34,7 +34,40 @@ jobs: with: fetch-depth: 1 - uses: cashapp/activate-hermit@v1 - - run: update-workflow-issue + - run: update-dashboard-issue env: GH_TOKEN: ${{ secrets.FTL_WORKFLOW_TOKEN }} GH_REPO: ${{ github.repository }} + update-roadmap-issues: + runs-on: ubuntu-latest + strategy: + matrix: + label: ["jvm", "dx"] # add if desired: "codebase-health", "core", "infrastructure", "go", "security" + permissions: + issues: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + - uses: cashapp/activate-hermit@v1 + - run: | + declare -A label_to_issue_map=( + ["codebase-health"]=2443 + ["core"]=2442 + ["infrastructure"]=2441 + ["go"]=2440 + ["jvm"]=2439 + ["security"]=2438 + ["dx"]=2436 + ) + + issue_number=${label_to_issue_map["${{ matrix.label }}"]} + + if [ -n "$issue_number" ]; then + update-roadmap-issues "${{ matrix.label }}" "$issue_number" + else + echo "No associated issue found for label '${{ matrix.label }}'." + fi + env: + GH_TOKEN: ${{ secrets.FTL_WORKFLOW_TOKEN }} + GH_REPO: ${{ github.repository }} \ No newline at end of file diff --git a/scripts/update-workflow-issue b/scripts/update-dashboard-issue similarity index 94% rename from scripts/update-workflow-issue rename to scripts/update-dashboard-issue index efe98dbd6d..5c3f038635 100755 --- a/scripts/update-workflow-issue +++ b/scripts/update-dashboard-issue @@ -55,6 +55,15 @@ $( echo "$issues" ) +$( + issues="$(list_issues --label roadmap)" + test -z "$issues" && exit 0 + + echo "### https://github.com/TBD54566975/ftl/labels/roadmap" + echo + echo "$issues" +) + ### Active and recent issues $( diff --git a/scripts/update-roadmap-issues b/scripts/update-roadmap-issues new file mode 100755 index 0000000000..977bb6cd99 --- /dev/null +++ b/scripts/update-roadmap-issues @@ -0,0 +1,140 @@ +#!/bin/bash + +label="$1" +issue_number="$2" +if [ -z "$label" ] || [ -z "$issue_number" ]; then + echo "Error: Both label and issue number must be provided." + echo "Usage: $0