From d6aafb0fcb082cb2f7adad41ab3ae45d3cd6edbc Mon Sep 17 00:00:00 2001 From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Sun, 23 Jan 2022 16:48:15 +0100 Subject: [PATCH 1/4] add stale issue check workflow this should replace the functionality of the discontinued stale-bot --- .github/stale.yml | 27 --------------------------- .github/workflows/repo-stale.yaml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 27 deletions(-) delete mode 100644 .github/stale.yml create mode 100644 .github/workflows/repo-stale.yaml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 86d1216bae..0000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 120 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 21 -# Issues with these labels will never be considered stale -exemptLabels: - - regression - - security - - roadmap - - future - - feature - - enhancement - - confirmed -# Label to use when marking an issue as stale -staleLabel: stale -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. - - If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. - This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html). -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false - -# Disable automatic closing of pull requests -pulls: - daysUntilClose: false diff --git a/.github/workflows/repo-stale.yaml b/.github/workflows/repo-stale.yaml new file mode 100644 index 0000000000..3dca44122e --- /dev/null +++ b/.github/workflows/repo-stale.yaml @@ -0,0 +1,30 @@ +name: Issue Stale Check + +on: + schedule: + - cron: '30 1 * * *' + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v4.1.0 + with: + repo-token: ${{ github.token }} + days-before-stale: 120 + days-before-pr-stale: -1 + days-before-close: 21 + days-before-pr-close: -1 + exempt-issue-labels: regression,security,roadmap,future,feature,enhancement,confirmed + stale-issue-label: stale + stale-issue-message: |- + This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. + + If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. + + This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html). From 0c37ae4e7e619660534b56e4442132340da3b7fd Mon Sep 17 00:00:00 2001 From: K3rnelPan1c <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Sun, 23 Jan 2022 18:22:51 +0100 Subject: [PATCH 2/4] change PAT use for stale action --- .github/workflows/repo-stale.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/repo-stale.yaml b/.github/workflows/repo-stale.yaml index 3dca44122e..78a90795d8 100644 --- a/.github/workflows/repo-stale.yaml +++ b/.github/workflows/repo-stale.yaml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/stale@v4.1.0 with: - repo-token: ${{ github.token }} + repo-token: ${{ secrets.JF_BOT_TOKEN }} days-before-stale: 120 days-before-pr-stale: -1 days-before-close: 21 From 6a48153ebfcdf272d2c5459bc6c701a51b35aaab Mon Sep 17 00:00:00 2001 From: K3rnelPan1c <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Tue, 25 Jan 2022 18:33:49 +0100 Subject: [PATCH 3/4] add org filter to stale workflow --- .github/workflows/repo-stale.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/repo-stale.yaml b/.github/workflows/repo-stale.yaml index 78a90795d8..ef221760b8 100644 --- a/.github/workflows/repo-stale.yaml +++ b/.github/workflows/repo-stale.yaml @@ -12,6 +12,7 @@ permissions: jobs: stale: runs-on: ubuntu-latest + if: ${{ contains(github.repository, 'jellyfin/') }} steps: - uses: actions/stale@v4.1.0 with: From 8edfe0284ad726060d0cc4ae6d47c0bad301cc78 Mon Sep 17 00:00:00 2001 From: K3rnelPan1c <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Tue, 25 Jan 2022 22:58:23 +0100 Subject: [PATCH 4/4] remove obsolete permissions block we use the JF_BOT_TOKEN PAT and not the default GITHUB_TOKEN --- .github/workflows/repo-stale.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/repo-stale.yaml b/.github/workflows/repo-stale.yaml index ef221760b8..63ded41400 100644 --- a/.github/workflows/repo-stale.yaml +++ b/.github/workflows/repo-stale.yaml @@ -5,10 +5,6 @@ on: - cron: '30 1 * * *' workflow_dispatch: -permissions: - issues: write - pull-requests: write - jobs: stale: runs-on: ubuntu-latest