From bed4cadb09e243a214a73e022b27ce4621c7f351 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 21 Jan 2025 16:39:05 +0100 Subject: [PATCH] Revert "github-actions: fix slack inputs (#42359) (#42367)" This reverts commit 661df309dbdfe2975ff405810c498d0b828496f3. --- .../workflows/bump-elastic-stack-snapshot.yml | 5 ++--- .github/workflows/bump-golang.yml | 5 ++--- .../workflows/notify-stalled-snapshots.yml | 20 +++---------------- .github/workflows/updatecli-compose.yml | 10 ++-------- 4 files changed, 9 insertions(+), 31 deletions(-) diff --git a/.github/workflows/bump-elastic-stack-snapshot.yml b/.github/workflows/bump-elastic-stack-snapshot.yml index 82b4f95f6ba5..804ef8226edb 100644 --- a/.github/workflows/bump-elastic-stack-snapshot.yml +++ b/.github/workflows/bump-elastic-stack-snapshot.yml @@ -43,11 +43,9 @@ jobs: - if: ${{ failure() }} uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 with: - method: chat.postMessage - token: ${{ secrets.SLACK_BOT_TOKEN }} + channel-id: '#ingest-notifications' payload: | { - "channel": "#ingest-notifications", "text": "${{ env.SLACK_MESSAGE }}", "blocks": [ { @@ -60,4 +58,5 @@ jobs: ] } env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@update-me-with-the-slack-team-to-be-poked` please look what's going on " diff --git a/.github/workflows/bump-golang.yml b/.github/workflows/bump-golang.yml index 0955790dc6aa..29ed18ade6f6 100644 --- a/.github/workflows/bump-golang.yml +++ b/.github/workflows/bump-golang.yml @@ -33,11 +33,9 @@ jobs: - if: ${{ failure() }} uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 with: - method: chat.postMessage - token: ${{ secrets.SLACK_BOT_TOKEN }} + channel-id: '#ingest-notifications' payload: | { - "channel": "#ingest-notifications", "text": "${{ env.SLACK_MESSAGE }}", "blocks": [ { @@ -50,4 +48,5 @@ jobs: ] } env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@update-me-with-the-slack-team-to-be-poked` please look what's going on " diff --git a/.github/workflows/notify-stalled-snapshots.yml b/.github/workflows/notify-stalled-snapshots.yml index 17e5a47185f9..d70cb839c295 100644 --- a/.github/workflows/notify-stalled-snapshots.yml +++ b/.github/workflows/notify-stalled-snapshots.yml @@ -57,24 +57,10 @@ jobs: name: Report obsoleted branches (slack) uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 with: - method: chat.postMessage - token: ${{ secrets.SLACK_BOT_TOKEN }} - payload: | - { - "channel": "#ingest-notifications", - "text": "${{ env.MESSAGE }}", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "${{ env.SLACK_MESSAGE }}" - } - } - ] - } + channel-id: '#ingest-notifications' + payload: ":red_circle: Elastic Stack version for the `${{ matrix.branch }}` branch has not been updated for a while (`> 7 days`). Review the (<${{ env.URL_QUERY }}|open PRs>)" env: - SLACK_MESSAGE: ":red_circle: Elastic Stack version for the `${{ matrix.branch }}` branch has not been updated for a while (`> 7 days`). Review the (<${{ env.URL_QUERY }}|open PRs>)" + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} - if: ${{ contains(steps.search.outputs.found, 'true') }} name: Report obsoleted branches (email) diff --git a/.github/workflows/updatecli-compose.yml b/.github/workflows/updatecli-compose.yml index cccda71a3a88..d92bf5b5865c 100644 --- a/.github/workflows/updatecli-compose.yml +++ b/.github/workflows/updatecli-compose.yml @@ -38,18 +38,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ failure() }} -<<<<<<< HEAD uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0 -======= - name: Report obsoleted branches (slack) - uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 ->>>>>>> 175211509 (github-actions: fix slack inputs (#42359)) with: - method: chat.postMessage - token: ${{ secrets.SLACK_BOT_TOKEN }} + channel-id: '#ingest-notifications' payload: | { - "channel": "#ingest-notifications", "text": "${{ env.SLACK_MESSAGE }}", "blocks": [ { @@ -62,5 +55,6 @@ jobs: ] } env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@update-me-with-the-slack-team-to-be-poked` please look what's going on " \ No newline at end of file