From 6ac941f981b3e97e9a44adb7071de012e46e83b4 Mon Sep 17 00:00:00 2001 From: Thomas Hughes Date: Thu, 2 Jul 2020 12:30:44 -0500 Subject: [PATCH 1/2] Create stale.yml --- .github/workflows/stale.yml | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 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 00000000..1144c733 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,44 @@ +on: + schedule: + # every day at 0:00 UTC + - cron: "0 0 * * *" + issue_comment: + types: [created, deleted, edited] + +name: "services-stale[bot]" + +jobs: + + markstale: + runs-on: ubuntu-latest + # only run on schedule + if: "github.event_name == 'schedule'" + steps: + - name: Mark issue stale + uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity.\nIt will be closed in 14 days if no further activity occurs.\nThank you for your contributions.\n\nIf you think this issue should stay open, please remove the `O: stale 🤖` label or comment on the issue." + stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity.\nIt will be closed in 14 days if no further activity occurs.\nThank you for your contributions.\n\nIf you think this pull request should stay open, please remove the `O: stale 🤖` label or comment on the pull request." + days-before-stale: 30 + days-before-close: 14 + stale-issue-label: "O: stale 🤖" + exempt-issue-label: "O: backlog 🤖" + stale-pr-label: "O: stale 🤖" + exempt-pr-label: "O: backlog 🤖" + + marknotstale: + runs-on: ubuntu-latest + # do not run on schedule + if: "github.event_name == 'issue_comment' && contains(github.event.issue.labels.*.name, 'O: stale 🤖') && github.event.issue.user.type != 'Bot'" + steps: + - name: Mark issue not stale + uses: actions/github-script@v2 + with: + script: | + github.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: 'O: stale 🤖' + }) From b3d7992c5a90d1649c26a8ac8b94b55781d73666 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 2 Jul 2020 12:46:30 -0500 Subject: [PATCH 2/2] making pretty --- .github/workflows/stale.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1144c733..cff0986d 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,3 +1,9 @@ +--- +############################### +############################### +## StaleBot for Super-Linter ## +############################### +############################### on: schedule: # every day at 0:00 UTC @@ -5,10 +11,18 @@ on: issue_comment: types: [created, deleted, edited] -name: "services-stale[bot]" +################### +# Name of the Job # +################### +name: "Stale[bot]" +############### +# Run the job # +############### jobs: - + ####################### + # Mark an Issue Stale # + ####################### markstale: runs-on: ubuntu-latest # only run on schedule @@ -27,6 +41,9 @@ jobs: stale-pr-label: "O: stale 🤖" exempt-pr-label: "O: backlog 🤖" + ################## + # Mark not stale # + ################## marknotstale: runs-on: ubuntu-latest # do not run on schedule