Skip to content

Commit 13a2c3a

Browse files
chore: Apply suggestions
Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com>
1 parent 6d36995 commit 13a2c3a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

send-slack-notification/action.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,10 @@ runs:
2222
name: slack-thread-id-${{ github.run_id }}
2323

2424
- name: Extract Slack Thread ID into Environment Variable
25-
env:
26-
RETRIEVE_SLACK_THREAD_ID_OUTCOME: ${{ steps.retrieve-slack-thread-id.outcome }}
25+
if: steps.retrieve-slack-thread-id.outcome == 'success'
2726
shell: bash
2827
run: |
29-
if [ "$RETRIEVE_SLACK_THREAD_ID_OUTCOME" = "success" ]; then
30-
echo "SLACK_THREAD_ID=$(cat slack-thread-id)" | tee -a "$GITHUB_ENV"
31-
else
32-
echo "SLACK_THREAD_ID=none" | tee -a "$GITHUB_ENV"
33-
fi
28+
echo "SLACK_THREAD_ID=$(cat slack-thread-id)" | tee -a "$GITHUB_ENV"
3429
3530
- name: Format message
3631
env:
@@ -61,7 +56,7 @@ runs:
6156
payload: |
6257
channel: "${{ inputs.channel-id }}"
6358
text: "${{ env.MESSAGE_TEXT }}"
64-
${{ env.SLACK_THREAD_ID != 'none' && format('thread_ts: "{0}"', env.SLACK_THREAD_ID) || '' }}
59+
${{ steps.retrieve-slack-thread-id.outcome == 'success' && format('thread_ts: "{0}"', env.SLACK_THREAD_ID) || '' }}
6560
attachments:
6661
- pretext: "See the details below for a summary of which job(s) ${{ env.MESSAGE_VERB }}."
6762
color: "${{ env.MESSAGE_COLOR }}"

0 commit comments

Comments
 (0)