From 9ba5e5a8c6f19376b2367c9803b826e88188a2d0 Mon Sep 17 00:00:00 2001 From: asyncapi-bot <61865014+asyncapi-bot@users.noreply.github.com> Date: Fri, 14 Jan 2022 09:00:09 +0100 Subject: [PATCH] ci: update global workflows (#190) --- .github/workflows/add-good-first-issue-labels.yml | 4 ++-- .github/workflows/help-command.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/add-good-first-issue-labels.yml b/.github/workflows/add-good-first-issue-labels.yml index 3b816b631..b9cdd0674 100644 --- a/.github/workflows/add-good-first-issue-labels.yml +++ b/.github/workflows/add-good-first-issue-labels.yml @@ -11,7 +11,7 @@ on: jobs: add-labels: - if: github.event.issue && github.event.issue.state != 'closed' + if: ${{!github.event.issue.pull_request && github.event.issue.state != 'closed' && github.actor != 'asyncapi-bot'}} runs-on: ubuntu-latest steps: - name: Add label @@ -32,7 +32,7 @@ jobs: values[1] = 'docs'; } if(values.length != 2 || !areas.includes(values[1])){ - const message = `Hey @${context.payload.sender.login}, something is wrong with your command please use \`/help\` for help.` + const message = `Hey @${context.payload.sender.login}, your message doesn't follow the requirements, you can try \`/help\`.` await github.rest.issues.createComment({ issue_number: context.issue.number, diff --git a/.github/workflows/help-command.yml b/.github/workflows/help-command.yml index eee773018..fd7ed3999 100644 --- a/.github/workflows/help-command.yml +++ b/.github/workflows/help-command.yml @@ -10,7 +10,7 @@ on: jobs: create_help_comment_pr: - if: github.event.issue.pull_request && contains(github.event.comment.body, '/help') + if: github.event.issue.pull_request && contains(github.event.comment.body, '/help' && github.actor != 'asyncapi-bot') runs-on: ubuntu-latest steps: - uses: actions-ecosystem/action-create-comment@v1 @@ -26,7 +26,7 @@ jobs: - `/ready-to-merge` or `/rtm` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added - `/do-not-merge` or `/dnm` - This comment will block automerging even if all conditions are met and ready-to-merge label is added create_help_comment_issue: - if: ${{ !github.event.issue.pull_request && contains(github.event.comment.body, '/help') }} + if: ${{ !github.event.issue.pull_request && contains(github.event.comment.body, '/help') && github.actor != 'asyncapi-bot'}} runs-on: ubuntu-latest steps: - uses: actions-ecosystem/action-create-comment@v1