From 9786c8b5545b0e262a743a2690cb85a7c91016da Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 11 Jun 2022 21:24:19 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Updates=20bot=20action=20for=20n?= =?UTF-8?q?ew=20users?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/issue-spam-control.yml | 37 ------------------------ .github/workflows/new-issues-check.yml | 22 ++++++++++++++ 2 files changed, 22 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/issue-spam-control.yml create mode 100644 .github/workflows/new-issues-check.yml diff --git a/.github/workflows/issue-spam-control.yml b/.github/workflows/issue-spam-control.yml deleted file mode 100644 index 13d6357b..00000000 --- a/.github/workflows/issue-spam-control.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Will add a comment and close any new issues opened by -# users who have not yet committed to, or starred the repo -name: 🎯 Issue Spam Control -on: - issues: - types: [opened, reopened] -jobs: - check-user: - if: > - ${{ - ! contains( github.event.issue.labels.*.name, '📌 Keep Open') && - ! contains( github.event.issue.labels.*.name, '🌈 Feedback') && - ! contains( github.event.issue.labels.*.name, '💯 Showcase') && - github.event.comment.author_association != 'CONTRIBUTOR' - }} - runs-on: ubuntu-latest - name: Close issue opened by non-stargazer - steps: - - name: close - uses: uhyo/please-star-first@v1.0.1 - with: - token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - message: | - Welcome to Dashy 👋 - It's great to have you here, but unfortunately your ticket has been closed to prevent spam. Before reopening this issue, please ensure the following criteria are met. - - Issues are sometimes closed when users: - - Have only recently joined GitHub - - Have not yet stared this repository - - Have not previously interacted with the repo - - Before you reopen this issue, please also ensure that: - - You have checked that a similar issue does not already exist - - You have checked the documentation for an existing solution - - You have completed the relevant sections in the Issue template - - Once you have verified the above standards are met, you may reopen this issue. Sorry for any inconvenience caused, I'm just a bot, and sometimes make mistakes 🤖 diff --git a/.github/workflows/new-issues-check.yml b/.github/workflows/new-issues-check.yml new file mode 100644 index 00000000..e90314bf --- /dev/null +++ b/.github/workflows/new-issues-check.yml @@ -0,0 +1,22 @@ +name: ⭐ Hello non-Stargazers +on: + issues: + types: [opened, reopened] +jobs: + check-user: + if: > + ${{ + ! contains( github.event.issue.labels.*.name, '📌 Keep Open') && + ! contains( github.event.issue.labels.*.name, '🌈 Feedback') && + ! contains( github.event.issue.labels.*.name, '💯 Showcase') && + github.event.comment.author_association != 'CONTRIBUTOR' + }} + runs-on: ubuntu-latest + name: Add comment to issues opened by non-stargazers + steps: + - name: comment + uses: qxip/please-star-light@v4 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + autoclose: false + message: "If you're enjoying Dashy, consider dropping us a ⭐
_🤖 I'm a bot, and this message was automated_"