From e2680bfbc8031d67aa3eae9deaff4dded2d3beab Mon Sep 17 00:00:00 2001 From: Jory Burson Date: Thu, 12 Jun 2025 17:20:45 -0400 Subject: [PATCH 1/2] Create bug-tracker.yml will this work? who can say. Signed-off-by: Jory Burson --- .github/workflows/bug-tracker.yml | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/bug-tracker.yml diff --git a/.github/workflows/bug-tracker.yml b/.github/workflows/bug-tracker.yml new file mode 100644 index 0000000..a23f41e --- /dev/null +++ b/.github/workflows/bug-tracker.yml @@ -0,0 +1,46 @@ +name: Bug tracker + +on: + workflow_dispatch: + issues: + types: [opened, labeled] + +jobs: + get-org-repos: + runs-on: ubuntu-latest + steps: + - uses: austenstone/get-org-repos@main + with: + github-token: ${{ secrets.GH_TOKEN }} + id: get-org-repos + outputs: + repos: ${{ steps.get-org-repos.outputs.repos }} + + sync: + needs: + - get-org-repos + runs-on: ubuntu-latest + strategy: + matrix: + repo: ${{ fromJson(needs.get-org-repos.outputs.repos) }} + fail-fast: false + steps: + - uses: actions/checkout@main + with: + repository: ${{ github.event.organization.login }}/${{ matrix.repo }} + token: ${{ secrets.GH_TOKEN }} + - uses: amenocal/stale@main + with: + repo-token: ${{ secrets.GH_TOKEN }} + repo-name: ${{ matrix.repo }} + + add_bug_to_project: + if: github.event.label.name == 'bug' || contains(github.event.issue.labels.*.name, 'bug') + runs-on: ubuntu-latest + steps: + - name: Add issue to project + uses: actions/add-to-project@v1 + with: + project-url: https://github.com/orgs/fairpm/projects/2 + github-token: ${{ secrets.PROJECT_PAT }} + labeled: bug From f1afdb1d45ae13a788ebce437e093c018a514607 Mon Sep 17 00:00:00 2001 From: Jory Burson Date: Thu, 12 Jun 2025 17:41:28 -0400 Subject: [PATCH 2/2] Update bug-tracker.yml Signed-off-by: Jory Burson --- .github/workflows/bug-tracker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bug-tracker.yml b/.github/workflows/bug-tracker.yml index a23f41e..7001cb6 100644 --- a/.github/workflows/bug-tracker.yml +++ b/.github/workflows/bug-tracker.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: austenstone/get-org-repos@main with: - github-token: ${{ secrets.GH_TOKEN }} + github-token: ${{ secrets.PROJECT_PAT }} id: get-org-repos outputs: repos: ${{ steps.get-org-repos.outputs.repos }} @@ -28,10 +28,10 @@ jobs: - uses: actions/checkout@main with: repository: ${{ github.event.organization.login }}/${{ matrix.repo }} - token: ${{ secrets.GH_TOKEN }} + token: ${{ secrets.PROJECT_PAT }} - uses: amenocal/stale@main with: - repo-token: ${{ secrets.GH_TOKEN }} + repo-token: ${{ secrets.PROJECT_PAT }} repo-name: ${{ matrix.repo }} add_bug_to_project: