From cd354e1bd5983a27c6187172f8f64b20bbfcc181 Mon Sep 17 00:00:00 2001 From: Matthew Parker Date: Sat, 26 Oct 2024 00:04:39 +0100 Subject: [PATCH 1/2] Added permissions for stale --- .github/workflows/stale.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index aabe16d5..3b84a8fc 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -6,6 +6,9 @@ on: jobs: stale: runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write steps: - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9 with: From 013175d3026ddd8d26ce357ccd773668bfe094a3 Mon Sep 17 00:00:00 2001 From: Matthew Parker Date: Sat, 26 Oct 2024 00:14:25 +0100 Subject: [PATCH 2/2] added todos to issues as part of dev pipeline --- .github/workflows/dev.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 8f1ae358..c70fe735 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -18,6 +18,38 @@ jobs: issues: read checks: write + todos: + name: Convert Todos to Issues + runs-on: ubuntu-latest + needs: build + if: github.event_name == 'push' + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: "TODO to Issue" + uses: "alstr/todo-to-issue-action@v5" + with: + INSERT_ISSUE_URLS: true + AUTO_ASSIGN: true + CLOSE_ISSUES: true + - name: Set Git user + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + - name: Commit and Push Changes + run: | + git add -A + if [[ `git status --porcelain` ]]; then + git commit -m "Automatically added GitHub issue links to TODOs" + git push origin main + else + echo "No changes to commit" + fi + + release: name: Push to main runs-on: ubuntu-latest