From d5eef8e42c37bf98640377f2bf4006f753e72c42 Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Fri, 29 Aug 2025 03:57:20 +0000 Subject: [PATCH] ci: make blink ci failure prompt a variable --- .github/workflows/ci.yaml | 4 +++- .github/workflows/nightly-gauntlet.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 747f158e28a9e..b6229f2a3f21f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1614,6 +1614,7 @@ jobs: steps: - name: Send Slack notification run: | + ESCAPED_PROMPT=$(printf "%s" "<@U08TJ4YNCA3> $BLINK_CI_FAILURE_PROMPT" | jq -Rsa .) curl -X POST -H 'Content-type: application/json' \ --data '{ "blocks": [ @@ -1653,7 +1654,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "<@U08TJ4YNCA3> investigate this CI failure. Check logs, search for existing issues, use git blame to find who last modified failing tests, create issue in coder/internal (not public repo), use title format \"flake: TestName\" for flaky tests, and assign to the person from git blame." + "text": '"$ESCAPED_PROMPT"' } } ] @@ -1661,3 +1662,4 @@ jobs: env: SLACK_WEBHOOK: ${{ secrets.CI_FAILURE_SLACK_WEBHOOK }} RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + BLINK_CI_FAILURE_PROMPT: ${{ vars.BLINK_CI_FAILURE_PROMPT }} diff --git a/.github/workflows/nightly-gauntlet.yaml b/.github/workflows/nightly-gauntlet.yaml index 5769b3b652c44..214053be601d2 100644 --- a/.github/workflows/nightly-gauntlet.yaml +++ b/.github/workflows/nightly-gauntlet.yaml @@ -170,6 +170,7 @@ jobs: steps: - name: Send Slack notification run: | + ESCAPED_PROMPT=$(printf "%s" "<@U08TJ4YNCA3> $BLINK_CI_FAILURE_PROMPT" | jq -Rsa .) curl -X POST -H 'Content-type: application/json' \ --data '{ "blocks": [ @@ -209,7 +210,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "<@U08TJ4YNCA3> investigate this CI failure. Check logs, search for existing issues, use git blame to find who last modified failing tests, create issue in coder/internal (not public repo), use title format \"flake: TestName\" for flaky tests, and assign to the person from git blame." + "text": '"$ESCAPED_PROMPT"' } } ] @@ -217,3 +218,4 @@ jobs: env: SLACK_WEBHOOK: ${{ secrets.CI_FAILURE_SLACK_WEBHOOK }} RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + BLINK_CI_FAILURE_PROMPT: ${{ vars.BLINK_CI_FAILURE_PROMPT }}