From 6bb2bbb18b2ed43a4d3c7834ee1c4928a18a367e Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 5 Sep 2021 23:19:32 +0100 Subject: [PATCH 1/4] :robot: Uses liss-bot token for comments, and updates code-doc --- .github/workflows/dependency-updates-summary.yml | 2 +- .github/workflows/issue-spam-control.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dependency-updates-summary.yml b/.github/workflows/dependency-updates-summary.yml index 145064a5..daeddaf7 100644 --- a/.github/workflows/dependency-updates-summary.yml +++ b/.github/workflows/dependency-updates-summary.yml @@ -11,7 +11,7 @@ jobs: - name: Yarn Lock Changes uses: Simek/yarn-lock-changes@main with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.BOT_GITHUB_TOKEN }} collapsibleThreshold: '25' failOnDowngrade: 'false' path: 'yarn.lock' diff --git a/.github/workflows/issue-spam-control.yml b/.github/workflows/issue-spam-control.yml index f1386f02..3032a042 100644 --- a/.github/workflows/issue-spam-control.yml +++ b/.github/workflows/issue-spam-control.yml @@ -1,3 +1,5 @@ +# Will add a comment and close new issues opened by users that may be spam, or have not starred +# Is still a work in progress, will also detect if user has previous activity in repo and check when joined GH on: issues: types: [opened, reopened] From 23441d87f46dc6e77483fd652b1388158d514342 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 5 Sep 2021 23:20:20 +0100 Subject: [PATCH 2/4] :robot: Starts with the PR auto-commenter script --- .github/pr-auto-comments.yml | 17 +++++++++++++++++ .github/workflows/pr-commenter.yml | 11 +++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .github/pr-auto-comments.yml create mode 100644 .github/workflows/pr-commenter.yml diff --git a/.github/pr-auto-comments.yml b/.github/pr-auto-comments.yml new file mode 100644 index 00000000..e2d145bf --- /dev/null +++ b/.github/pr-auto-comments.yml @@ -0,0 +1,17 @@ +comment: + on-update: recreate + header: | + Thank you for contributing to Dashy! ✨ + footer: | + --- + > I'm a bot, and this is an automated comment 🤖 + snippets: + - id: docs-changes + files: + - '*.md' + - '**/*.md' + body: | + When making changes to the documentation, be sure to double check that: + - Link and images URLs properly resolve + - Your spelling and grammar is correct + - Any markdown formatting is valid diff --git a/.github/workflows/pr-commenter.yml b/.github/workflows/pr-commenter.yml new file mode 100644 index 00000000..cc87a05e --- /dev/null +++ b/.github/workflows/pr-commenter.yml @@ -0,0 +1,11 @@ +# Adds comments to PR, based on which files are modified +name: PR Commenter +on: [ pull_request_target ] +jobs: + pr-comment: + runs-on: ubuntu-latest + steps: + - uses: exercism/pr-commenter-action@v1.2.0 + with: + github-token: ${{ github.BOT_GITHUB_TOKEN }} + config-file: .github/pr-auto-comments.yml From 5cc5ffac9ae674742f514dc407c0ca91a79c00f4 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 5 Sep 2021 23:21:00 +0100 Subject: [PATCH 3/4] :sunglasses: Action to add nice GIF when PR is LGTM --- .github/workflows/lgtm-comment.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/lgtm-comment.yml diff --git a/.github/workflows/lgtm-comment.yml b/.github/workflows/lgtm-comment.yml new file mode 100644 index 00000000..e9df2440 --- /dev/null +++ b/.github/workflows/lgtm-comment.yml @@ -0,0 +1,27 @@ +# Replies with a random looks-good GIF, when a PR is reviewed with a LGTM comment +name: Add Random LGTM GIF +on: + issue_comment: { types: [created] } + pull_request_review: { types: [submitted] } +jobs: + post: + runs-on: ubuntu-latest + if: (!contains(github.actor, '[bot]')) # Exclude bot comment + steps: + - uses: ddradar/choose-random-action@v1 + id: act + with: + contents: | + https://media4.giphy.com/media/11ISwbgCxEzMyY/giphy.gif + https://media4.giphy.com/media/SgwPtMD47PV04/giphy.gif + https://media1.giphy.com/media/3orifdxwbvVLfS3CrS/giphy.gif + https://media4.giphy.com/media/RPwrO4b46mOdy/giphy.gif + https://media2.giphy.com/media/3o7abGQa0aRJUurpII/giphy.gif + https://media3.giphy.com/media/ZZrDTGSJXlHW9Y2khu/giphy.gif + https://media3.giphy.com/media/5DQdk5oZzNgGc/giphy.gif + https://media4.giphy.com/media/3o7abB06u9bNzA8lu8/giphy.gif + https://media4.giphy.com/media/l2JJrEx9aRsjNruhi/giphy.gif + - uses: ddradar/lgtm-action@v1 + with: + image-url: ${{ steps.act.outputs.selected }} + token: ${{ secrets.BOT_GITHUB_TOKEN }} \ No newline at end of file From 01f3c700c107cbab89f1b99bbbc935156cd25017 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 5 Sep 2021 23:21:40 +0100 Subject: [PATCH 4/4] :anger: Action to prevent inapropriate lang in comments --- .github/workflows/mind-your-language.yml | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/mind-your-language.yml diff --git a/.github/workflows/mind-your-language.yml b/.github/workflows/mind-your-language.yml new file mode 100644 index 00000000..b32e55ec --- /dev/null +++ b/.github/workflows/mind-your-language.yml @@ -0,0 +1,26 @@ +# Detects offensive language in comments and takes reaction +name: Mind your language +on: + issues: + types: + - opened + - edited + issue_comment: + types: + - created + - edited + pull_request_review_comment: + types: + - created + - edited +jobs: + echo_issue_comment: + runs-on: ubuntu-latest + name: profanity check + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Profanity check step + uses: tailaiw/mind-your-language-action@v1.0.3 + env: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} \ No newline at end of file