From e76326c40b95d7d78317b158f3cdddaf65e98572 Mon Sep 17 00:00:00 2001 From: nsingh-branch Date: Tue, 19 Sep 2023 17:48:53 -0700 Subject: [PATCH] Slack message format fix --- .github/workflows/dependabot-merger.yml | 31 +++++++++++++------------ 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/dependabot-merger.yml b/.github/workflows/dependabot-merger.yml index 9beb4dd43..2c6fc4ae9 100644 --- a/.github/workflows/dependabot-merger.yml +++ b/.github/workflows/dependabot-merger.yml @@ -85,7 +85,7 @@ jobs: }); console.log('Created combined PR: ' + response.data.html_url); core.setOutput('pr_url', response.data.html_url); - core.setOutput('pr_body', response.data.body); + core.setOutput('pr_list', combinedPRs); - name: Post to a Slack channel uses: slackapi/slack-github-action@v1.24.0 @@ -99,7 +99,7 @@ jobs: "type": "header", "text": { "type": "plain_text", - "text": "⚡️ New iOS Dependabot Combined PR", + "text": "⚡️ New iOS Combined Dependabot PR", "emoji": true } }, @@ -107,26 +107,27 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "*Included PRs:*\n${{ steps.create-pr.outputs.pr_body }}" + "text": "*Included PRs:*\n${{ toJSON(steps.create-pr.outputs.pr_list) }}" } }, { "type": "actions", "elements": [ - { - "type": "button", - "text": { - "type": "plain_text", - "text": "View Combined PR", - "emoji": true - }, - "value": "pr-button", - "url": "${{ steps.create-pr.outputs.pr_url }}", - "action_id": "link-action" - } + { + "type": "button", + "text": { + "type": "plain_text", + "text": "View Combined PR", + "emoji": true + }, + "value": "pr-button", + "url": "${{ steps.create-pr.outputs.pr_url }}", + "action_id": "link-action", + "style": "primary" + } ] } - ] + ] } env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_SDK_BOT_TOKEN }}