From 8eaaa1e7e604e02828ca52b7651712769b6eea01 Mon Sep 17 00:00:00 2001 From: Bianca Lisle Date: Tue, 13 May 2025 12:18:02 +0200 Subject: [PATCH 1/3] chore: auto-close stale issues --- .github/workflows/stale.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..85de7ac --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,37 @@ +--- + name: 'Stale issues and PRs handler' + on: + workflow_dispatch: + schedule: + - cron: '0 0 * * *' + + permissions: read-all + + jobs: + stale: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: GitHubSecurityLab/actions-permissions/monitor@v1 + - uses: mongodb-js/devtools-shared/actions/setup-bot-token@main + id: app-token + with: + app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }} + private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }} + - uses: actions/stale@v9 + id: stale + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: | + This issue has gone 30 days without any activity and meets the project's definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy! + stale-pr-message: | + This PR has gone 30 days without any activity and meets the project's definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy! + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' + days-before-stale: 30 + days-before-close: 30 + exempt-all-milestones: true + exempt-issue-labels: 'not_stale' + exempt-pr-labels: 'not_stale' From 3f003d87f8edf52ffe5cab365ffcfcb092ffce53 Mon Sep 17 00:00:00 2001 From: Bianca Lisle Date: Tue, 13 May 2025 13:16:28 +0200 Subject: [PATCH 2/3] Reformat --- .github/workflows/stale.yml | 72 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 85de7ac..4e821d3 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,37 +1,37 @@ --- - name: 'Stale issues and PRs handler' - on: - workflow_dispatch: - schedule: - - cron: '0 0 * * *' - - permissions: read-all - - jobs: - stale: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - - uses: mongodb-js/devtools-shared/actions/setup-bot-token@main - id: app-token - with: - app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }} - private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }} - - uses: actions/stale@v9 - id: stale - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: | - This issue has gone 30 days without any activity and meets the project's definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy! - stale-pr-message: | - This PR has gone 30 days without any activity and meets the project's definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy! - stale-issue-label: 'no-issue-activity' - stale-pr-label: 'no-pr-activity' - days-before-stale: 30 - days-before-close: 30 - exempt-all-milestones: true - exempt-issue-labels: 'not_stale' - exempt-pr-labels: 'not_stale' +name: "Stale issues and PRs handler" +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * *" + +permissions: read-all + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: GitHubSecurityLab/actions-permissions/monitor@v1 + - uses: mongodb-js/devtools-shared/actions/setup-bot-token@main + id: app-token + with: + app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }} + private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }} + - uses: actions/stale@v9 + id: stale + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: | + This issue has gone 30 days without any activity and meets the project's definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy! + stale-pr-message: | + This PR has gone 30 days without any activity and meets the project's definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy! + stale-issue-label: "no-issue-activity" + stale-pr-label: "no-pr-activity" + days-before-stale: 30 + days-before-close: 30 + exempt-all-milestones: true + exempt-issue-labels: "not_stale" + exempt-pr-labels: "not_stale" From 8981395506e330ce33e7e0a292ca398783d50560 Mon Sep 17 00:00:00 2001 From: Bianca Lisle Date: Tue, 13 May 2025 14:01:17 +0200 Subject: [PATCH 3/3] Remove bot --- .github/workflows/stale.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 4e821d3..fb2ec4d 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -15,11 +15,6 @@ jobs: pull-requests: write steps: - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - - uses: mongodb-js/devtools-shared/actions/setup-bot-token@main - id: app-token - with: - app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }} - private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }} - uses: actions/stale@v9 id: stale with: