From 974a70b7ee446886fe41e24826553593f24b59b7 Mon Sep 17 00:00:00 2001 From: Roaa Sakr Date: Thu, 19 Aug 2021 09:55:37 -0700 Subject: [PATCH 1/6] add stale issues marker workflow --- .github/workflows/stale-tasks.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/stale-tasks.yml diff --git a/.github/workflows/stale-tasks.yml b/.github/workflows/stale-tasks.yml new file mode 100644 index 000000000..a4fae9d81 --- /dev/null +++ b/.github/workflows/stale-tasks.yml @@ -0,0 +1,21 @@ +# This is a workflow that runs periodically to mark issues with no recent activity as stale, it also closes/removes-label based on following activities + +name: Close stale issues +on: + schedule: + - cron: '0 0 * * *' # runs daily at 12:00 am UTC + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v4 + with: + stale-issue-label: stale + days-before-stale: 30 + days-before-close: 5 + remove-issue-stale-when-updated: true + stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' + days-before-pr-close: -1 # do not close PRs + token: ${{ secrets.GITHUB_TOKEN }} From 9d490f8c6373649869c5ee42ec2d8815a2587044 Mon Sep 17 00:00:00 2001 From: Roaa Sakr Date: Mon, 23 Aug 2021 11:56:11 -0700 Subject: [PATCH 2/6] update based on feedback --- .github/workflows/stale-tasks.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/stale-tasks.yml b/.github/workflows/stale-tasks.yml index a4fae9d81..9acecc092 100644 --- a/.github/workflows/stale-tasks.yml +++ b/.github/workflows/stale-tasks.yml @@ -1,4 +1,4 @@ -# This is a workflow that runs periodically to mark issues with no recent activity as stale, it also closes/removes-label based on following activities +# This is a workflow that runs periodically to mark issues/prs with no recent activity as stale, it also closes/removes-label based on following activity name: Close stale issues on: @@ -12,10 +12,16 @@ jobs: - uses: actions/stale@v4 with: stale-issue-label: stale - days-before-stale: 30 - days-before-close: 5 - remove-issue-stale-when-updated: true - stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.' - close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' - days-before-pr-close: -1 # do not close PRs + stale-pr-label: stale + days-before-stale: 45 + days-before-close: 45 + remove-stale-when-updated: true + stale-issue-message: > + Issue has been automatically marked as stale because it has been open for 45 days with no activity. Issue will be closed if no further activity occurs. + Thank you for your contributions. + close-issue-message: 'This issue was closed because it has been stalled with no activity.' + stale-pr-message: > + PR has been automatically marked as stale because it has been open for 45 days with no activity. PR will be closed if no further activity occurs. + Thank you for your contributions. + exempt-issue-labels: keep-alive token: ${{ secrets.GITHUB_TOKEN }} From e1ec972fa0043adf8c39f4f698ace3955ce1b9af Mon Sep 17 00:00:00 2001 From: Roaa Sakr Date: Mon, 23 Aug 2021 12:07:37 -0700 Subject: [PATCH 3/6] update --- .github/workflows/stale-tasks.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/stale-tasks.yml b/.github/workflows/stale-tasks.yml index 9acecc092..5e0168eab 100644 --- a/.github/workflows/stale-tasks.yml +++ b/.github/workflows/stale-tasks.yml @@ -1,6 +1,6 @@ # This is a workflow that runs periodically to mark issues/prs with no recent activity as stale, it also closes/removes-label based on following activity -name: Close stale issues +name: Mark and close stale issues/PRs on: schedule: - cron: '0 0 * * *' # runs daily at 12:00 am UTC @@ -19,7 +19,6 @@ jobs: stale-issue-message: > Issue has been automatically marked as stale because it has been open for 45 days with no activity. Issue will be closed if no further activity occurs. Thank you for your contributions. - close-issue-message: 'This issue was closed because it has been stalled with no activity.' stale-pr-message: > PR has been automatically marked as stale because it has been open for 45 days with no activity. PR will be closed if no further activity occurs. Thank you for your contributions. From fa07ff3d89b3a1a2577c09b87eab73e49a229b93 Mon Sep 17 00:00:00 2001 From: Roaa Sakr Date: Mon, 23 Aug 2021 12:08:29 -0700 Subject: [PATCH 4/6] not --- .github/workflows/stale-tasks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-tasks.yml b/.github/workflows/stale-tasks.yml index 5e0168eab..d75ed9db7 100644 --- a/.github/workflows/stale-tasks.yml +++ b/.github/workflows/stale-tasks.yml @@ -1,4 +1,4 @@ -# This is a workflow that runs periodically to mark issues/prs with no recent activity as stale, it also closes/removes-label based on following activity +# This is a workflow that runs periodically to mark issues/prs with no recent activity as stale, it also closes/removes label based on following activity name: Mark and close stale issues/PRs on: From 23aebfb9d4218238c9362183de650da03e6b313a Mon Sep 17 00:00:00 2001 From: Roaa Sakr Date: Tue, 24 Aug 2021 09:26:30 -0700 Subject: [PATCH 5/6] update messages --- .github/workflows/stale-tasks.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/stale-tasks.yml b/.github/workflows/stale-tasks.yml index d75ed9db7..9a416413e 100644 --- a/.github/workflows/stale-tasks.yml +++ b/.github/workflows/stale-tasks.yml @@ -17,10 +17,8 @@ jobs: days-before-close: 45 remove-stale-when-updated: true stale-issue-message: > - Issue has been automatically marked as stale because it has been open for 45 days with no activity. Issue will be closed if no further activity occurs. - Thank you for your contributions. + Issue has been automatically marked as stale due to inactivity for 45 days. Update the issue to remove label, otherwise it will be automatically closed. stale-pr-message: > - PR has been automatically marked as stale because it has been open for 45 days with no activity. PR will be closed if no further activity occurs. - Thank you for your contributions. + PR has been automatically marked as stale due to inactivity for 45 days. Update the PR to remove label, otherwise it will be automatically closed." exempt-issue-labels: keep-alive token: ${{ secrets.GITHUB_TOKEN }} From 1972435fdcb367c03af5430becbeb28fb47fec37 Mon Sep 17 00:00:00 2001 From: Roaa Sakr Date: Wed, 25 Aug 2021 11:00:00 -0700 Subject: [PATCH 6/6] dry-run --- .github/workflows/stale-tasks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/stale-tasks.yml b/.github/workflows/stale-tasks.yml index 9a416413e..28bec4e6e 100644 --- a/.github/workflows/stale-tasks.yml +++ b/.github/workflows/stale-tasks.yml @@ -22,3 +22,4 @@ jobs: PR has been automatically marked as stale due to inactivity for 45 days. Update the PR to remove label, otherwise it will be automatically closed." exempt-issue-labels: keep-alive token: ${{ secrets.GITHUB_TOKEN }} + debug-only: true