From 694a76147c5e6e719f58fb83ed90e6366d4f5b6f Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Fri, 23 Aug 2024 12:07:59 -0400 Subject: [PATCH 1/2] chore(ci): notify and prioritize `crash` labeled issues This change extends the existing workflow which prioritized issues labeled `regression`, including sending a slack notification. The workflow has been named more generically and completes the same steps for issues labeled `crash`. --- .../{regressions.yml => label-notifications.yml} | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename .github/workflows/{regressions.yml => label-notifications.yml} (92%) diff --git a/.github/workflows/regressions.yml b/.github/workflows/label-notifications.yml similarity index 92% rename from .github/workflows/regressions.yml rename to .github/workflows/label-notifications.yml index c75c445572ba..a2f60498c326 100644 --- a/.github/workflows/regressions.yml +++ b/.github/workflows/label-notifications.yml @@ -1,4 +1,4 @@ -name: Handle Regressions +name: Handle Label Notifications permissions: {} on: @@ -12,8 +12,8 @@ on: jobs: process: - name: Process Regression - if: github.event.label.name == 'regression' + name: Process Label + if: github.event.label.name == 'regression' || github.event.label.name == 'crash' runs-on: ubuntu-latest env: @@ -24,6 +24,7 @@ jobs: uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0 env: ISSUE_TITLE: ${{ toJSON(github.event.issue.title || github.event.pull_request.title) }} + LABEL_NAME: ${{ github.event.label.name }} SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} with: channel-id: ${{ secrets.SLACK_CHANNEL }} @@ -34,7 +35,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": ":warning: The following has been labeled as a regression:" + "text": ":warning: The following has been labeled as a $LABEL_NAME:" } }, { From 6ec8dea4f2126894a44a785bbc58dd8de9b6ec5d Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Fri, 23 Aug 2024 14:22:22 -0400 Subject: [PATCH 2/2] chore(ci): use label name directly --- .github/workflows/label-notifications.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/label-notifications.yml b/.github/workflows/label-notifications.yml index a2f60498c326..692df107f4d3 100644 --- a/.github/workflows/label-notifications.yml +++ b/.github/workflows/label-notifications.yml @@ -24,7 +24,6 @@ jobs: uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0 env: ISSUE_TITLE: ${{ toJSON(github.event.issue.title || github.event.pull_request.title) }} - LABEL_NAME: ${{ github.event.label.name }} SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} with: channel-id: ${{ secrets.SLACK_CHANNEL }} @@ -35,7 +34,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": ":warning: The following has been labeled as a $LABEL_NAME:" + "text": ":warning: The following has been labeled as a ${{ github.event.label.name }}:" } }, {