ruby-changes:57223
From: Takashi <ko1@a...>
Date: Thu, 22 Aug 2019 23:19:04 +0900 (JST)
Subject: [ruby-changes:57223] Takashi Kokubun: fd20b32130 (master): Make GitHub Actions Slack notification consistent
https://git.ruby-lang.org/ruby.git/commit/?id=fd20b32130 From fd20b32130f52f4a7799a8d7a367f5b39636bc6a Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Thu, 22 Aug 2019 23:10:54 +0900 Subject: Make GitHub Actions Slack notification consistent with Travis, rather than AppVeyor. Formerly it was made similar to AppVeyor to provide some normal set of CI failure notification. But for some reason people preferred a shorter variant and introduced a1d606c079f6c3d1779d885e0bf2e3991251609e and d8d8015b93c6daa8d8433895464db3493a2056e2. Instead of AppVeyor format, this commit chose Travis-like format to achieve consistency and to include usual CI-failure information, while keeping it one-liner for people who prefer short notifications. Note that this shrinks the 40-char sha to 10-char, using the new feature of k0kubun/action-slack@v...: https://github.com/k0kubun/action-slack/commit/1c88a05dac664cbafa1c99a37f292ed23ac1c289 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3272dc1..2e53d52 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -57,12 +57,14 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/macos.yml#L57 if: matrix.test_task == 'test-bundled-gems' && !contains(github.event.head_commit.message, '[ci skip]') - name: Leaked Globals run: make -s leaked-globals - - uses: k0kubun/action-slack@v... + - uses: k0kubun/action-slack@v... with: payload: | { "attachments": [{ - "text": "<https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ job.status }}: ${{ github.workflow }} / ${{ matrix.test_task }}> (<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>)", + "text": "${{ job.status}}: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ github.workflow }} / ${{ matrix.test_task }}> " + + "(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " + + "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}", "color": "danger" }] } diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index b3b5c70..1c82c57 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -65,12 +65,14 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/ubuntu.yml#L65 env: GITHUB_CONTEXT: ${{ toJson(github) }} if: failure() && github.event_name == 'push' - - uses: k0kubun/action-slack@v... + - uses: k0kubun/action-slack@v... with: payload: | { "attachments": [{ - "text": "<https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ job.status }}: ${{ github.workflow }} / ${{ matrix.test_task }}> (<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>)", + "text": "${{ job.status}}: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ github.workflow }} / ${{ matrix.test_task }}> " + + "(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " + + "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}", "color": "danger" }] } diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2f3069e..3987153 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -54,12 +54,14 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/windows.yml#L54 call "C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat" nmake ${{ matrix.test_task }} if: "!contains(github.event.head_commit.message, '[ci skip]')" - - uses: k0kubun/action-slack@v... + - uses: k0kubun/action-slack@v... with: payload: | { "attachments": [{ - "text": "<https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ job.status }}: ${{ github.workflow }} / ${{ matrix.test_task }}> (<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>)", + "text": "${{ job.status}}: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ github.workflow }} / ${{ matrix.test_task }}> " + + "(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " + + "of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}", "color": "danger" }] } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/