Update PR scrub action to display different message for merged PRs (#39723)

* Update PR Scrub to display different message for merged PRs

* Created separate steps for open and merged PRs
This commit is contained in:
Tam Mullen 2023-08-14 21:27:53 +01:00 committed by GitHub
parent 3edd1bd823
commit 5cfd509dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 2 deletions

View File

@ -24,9 +24,10 @@ runs:
run: | run: |
sla_timestamp=$(date -d "+ 5 hours" -u +%s) sla_timestamp=$(date -d "+ 5 hours" -u +%s)
echo "sla_timestamp=$sla_timestamp" >> $GITHUB_OUTPUT echo "sla_timestamp=$sla_timestamp" >> $GITHUB_OUTPUT
- name: Notify Slack - name: Notify Slack Open
uses: archive/github-actions-slack@d9dae40827adf93bddf939db6552d1e392259d7d uses: archive/github-actions-slack@d9dae40827adf93bddf939db6552d1e392259d7d
id: notify id: notify-open
if: steps.get_pr_status.outputs.pr_status == 'open'
with: with:
slack-bot-user-oauth-access-token: ${{ inputs.TEST_ASSISTANCE_BOT_TOKEN }} slack-bot-user-oauth-access-token: ${{ inputs.TEST_ASSISTANCE_BOT_TOKEN }}
slack-channel: ${{ inputs.WOO_PR_TESTING_ANALYSIS_SLACK_CHANNEL }} slack-channel: ${{ inputs.WOO_PR_TESTING_ANALYSIS_SLACK_CHANNEL }}
@ -36,3 +37,15 @@ runs:
*SLA:* <!date^${{ steps.calculate_sla.outputs.sla_timestamp }}^{date_short_pretty} at {time}|5 hours from now> *SLA:* <!date^${{ steps.calculate_sla.outputs.sla_timestamp }}^{date_short_pretty} at {time}|5 hours from now>
slack-optional-unfurl_links: false slack-optional-unfurl_links: false
slack-optional-unfurl_media: false slack-optional-unfurl_media: false
- name: Notify Slack Merged
uses: archive/github-actions-slack@d9dae40827adf93bddf939db6552d1e392259d7d
id: notify-merged
if: steps.get_pr_status.outputs.pr_status == 'merged'
with:
slack-bot-user-oauth-access-token: ${{ inputs.TEST_ASSISTANCE_BOT_TOKEN }}
slack-channel: ${{ inputs.WOO_PR_TESTING_ANALYSIS_SLACK_CHANNEL }}
slack-text: |
There is a new *${{ steps.get_pr_status.outputs.pr_status }}* PR to analyze.
<${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}> :thread:
slack-optional-unfurl_links: false
slack-optional-unfurl_media: false