From dc8c20150a499d47fd9b2ae4e68d2d907dfe105f Mon Sep 17 00:00:00 2001 From: Jonathan Chang Date: Mon, 27 Apr 2020 21:04:07 +1000 Subject: [PATCH] workflows: don't ping BrewTestBot on schedule (#53827) --- .github/workflows/publish-commit-bottles.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-commit-bottles.yml b/.github/workflows/publish-commit-bottles.yml index d776ac2b9d7..cf201ac264f 100644 --- a/.github/workflows/publish-commit-bottles.yml +++ b/.github/workflows/publish-commit-bottles.yml @@ -42,10 +42,18 @@ jobs: const repository = context.repo.owner + '/' + context.repo.repo const url = 'https://github.com/' + repository + '/actions/runs/' + run_id + let comment = '' + if (actor == 'BrewTestBot') { + comment += ':robot: A scheduled task' + } else { + comment += ':shipit: @' + actor + } + comment += ' has [triggered a merge](' + url + ').' + github.issues.createComment({ ...context.repo, issue_number: pr, - body: '@' + actor + ' has [triggered a merge](' + url + ').' + body: comment }) - name: Update Homebrew run: | @@ -98,10 +106,16 @@ jobs: const repository = context.repo.owner + '/' + context.repo.repo const url = 'https://github.com/' + repository + '/actions/runs/' + run_id + let comment = ':warning: ' + if (actor != 'BrewTestBot') { + comment += '@' + actor + } + comment += ' bottle publish [failed](' + url + ').' + github.issues.createComment({ ...context.repo, issue_number: pr, - body: '@' + actor + ' bottle publish [failed](' + url + ').' + body: comment }) github.issues.removeLabel({