From 8109b50877cf0c9e22952e5ff1563a85de3fa13f Mon Sep 17 00:00:00 2001 From: Claudia Regio Date: Thu, 11 Dec 2025 10:23:38 -0800 Subject: [PATCH 1/5] Add GitHub Action to update issue labels from "prerelease" to "fixed" --- .github/workflows/prerelease-to-fixed.yml | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/prerelease-to-fixed.yml diff --git a/.github/workflows/prerelease-to-fixed.yml b/.github/workflows/prerelease-to-fixed.yml new file mode 100644 index 0000000..2ea24ba --- /dev/null +++ b/.github/workflows/prerelease-to-fixed.yml @@ -0,0 +1,34 @@ + +name: Update Prerelease Label to Fixed Label + +on: + workflow_dispatch: # Manual trigger from Actions tab + +jobs: + update-labels: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up GitHub CLI + run: | + sudo apt-get update + sudo apt-get install -y gh + gh auth setup-git + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Remove "prerelease" and add "fixed" + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: | + echo "Finding issues with label 'prerelease'..." + issues=$(gh issue list --label "prerelease" --state open --json number --jq '.[].number') + if [ -z "$issues" ]; then + echo "No issues found with label 'prerelease'." + exit 0 + fi + for issue in $issues; do + echo "Updating issue #$issue" + gh issue edit "$issue" --remove-label "prerelease" --add-label "fixed" From 38790e8e95f651294eba04b7b6b4d3ed9f9ac832 Mon Sep 17 00:00:00 2001 From: Claudia Regio Date: Thu, 11 Dec 2025 10:26:14 -0800 Subject: [PATCH 2/5] Potential fix for code scanning alert no. 2: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/prerelease-to-fixed.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/prerelease-to-fixed.yml b/.github/workflows/prerelease-to-fixed.yml index 2ea24ba..52ec2bc 100644 --- a/.github/workflows/prerelease-to-fixed.yml +++ b/.github/workflows/prerelease-to-fixed.yml @@ -7,6 +7,9 @@ on: jobs: update-labels: runs-on: ubuntu-latest + permissions: + issues: write + contents: read steps: - name: Checkout uses: actions/checkout@v4 From 7d02493e459f5e9d92051155d7c645f2cade854d Mon Sep 17 00:00:00 2001 From: Claudia Regio Date: Thu, 11 Dec 2025 10:36:34 -0800 Subject: [PATCH 3/5] Add permissions for issues and contents in GitHub Action workflow --- .github/workflows/prerelease-to-fixed.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/prerelease-to-fixed.yml b/.github/workflows/prerelease-to-fixed.yml index 2ea24ba..0429aba 100644 --- a/.github/workflows/prerelease-to-fixed.yml +++ b/.github/workflows/prerelease-to-fixed.yml @@ -4,6 +4,10 @@ name: Update Prerelease Label to Fixed Label on: workflow_dispatch: # Manual trigger from Actions tab +permissions: + issues: write + contents: read + jobs: update-labels: runs-on: ubuntu-latest From ab66a69c446d264637fc1b9e30f1ec173ade29b5 Mon Sep 17 00:00:00 2001 From: Claudia Regio Date: Thu, 11 Dec 2025 10:37:47 -0800 Subject: [PATCH 4/5] Remove redundant permissions section from GitHub Action workflow --- .github/workflows/prerelease-to-fixed.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/prerelease-to-fixed.yml b/.github/workflows/prerelease-to-fixed.yml index 450459f..0429aba 100644 --- a/.github/workflows/prerelease-to-fixed.yml +++ b/.github/workflows/prerelease-to-fixed.yml @@ -11,9 +11,6 @@ permissions: jobs: update-labels: runs-on: ubuntu-latest - permissions: - issues: write - contents: read steps: - name: Checkout uses: actions/checkout@v4 From 927472242fa386850d0ec084233042bdb884cb87 Mon Sep 17 00:00:00 2001 From: Claudia Regio Date: Thu, 11 Dec 2025 11:02:31 -0800 Subject: [PATCH 5/5] jk it wants it somewhere else --- .github/workflows/prerelease-to-fixed.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/prerelease-to-fixed.yml b/.github/workflows/prerelease-to-fixed.yml index 0429aba..53e9c78 100644 --- a/.github/workflows/prerelease-to-fixed.yml +++ b/.github/workflows/prerelease-to-fixed.yml @@ -4,13 +4,12 @@ name: Update Prerelease Label to Fixed Label on: workflow_dispatch: # Manual trigger from Actions tab -permissions: - issues: write - contents: read - jobs: update-labels: runs-on: ubuntu-latest + permissions: + issues: write + contents: read steps: - name: Checkout uses: actions/checkout@v4