Update test-assistant-api-rest-change-tracker.yml slack-text message with milestone

This commit is contained in:
nigeljamesstevenson 2023-10-05 10:21:27 +01:00 committed by GitHub
parent 040ac64fb5
commit 9851535e0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 11 deletions

View File

@ -1,4 +1,5 @@
name: Send a Slack notification when a PR contains rest api changes name: Send a Slack notification when a PR contains rest api changes
on: on:
pull_request_target: pull_request_target:
types: [labeled] types: [labeled]
@ -13,15 +14,6 @@ jobs:
- name: Wait 2 minutes for other labelling jobs to finish - name: Wait 2 minutes for other labelling jobs to finish
run: sleep 2m run: sleep 2m
shell: bash shell: bash
- name: Get Milestone Information
id: get-milestone
run: |
milestone_title=$(curl -s -X GET -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "${{ github.event.pull_request.issue.milestone.url }}" | jq -r '.title')
milestone_description=$(curl -s -X GET -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "${{ github.event.pull_request.issue.milestone.url }}" | jq -r '.description')
echo "::set-output name=milestone_title::$milestone_title"
echo "::set-output name=milestone_description::$milestone_description"
- name: Notify Slack - name: Notify Slack
uses: archive/github-actions-slack@d9dae40827adf93bddf939db6552d1e392259d7d uses: archive/github-actions-slack@d9dae40827adf93bddf939db6552d1e392259d7d
id: notify id: notify
@ -31,7 +23,8 @@ jobs:
slack-text: | slack-text: |
<${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}> <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>
*Labels:* ${{ join(github.event.pull_request.labels.*.name, ', ') }} *Labels:* ${{ join(github.event.pull_request.labels.*.name, ', ') }}
*Milestone:* ${{ steps.get-milestone.outputs.milestone_title }} *Milestone:* <${{ github.event.pull_request.milestone.html_url }}|${{ github.event.pull_request.milestone.title }}>
*Milestone Description:* ${{ steps.get-milestone.outputs.milestone_description }} *Due on:* ${{ github.event.pull_request.milestone.due_on }}
*Description:* ${{ github.event.pull_request.milestone.description }}
slack-optional-unfurl_links: false slack-optional-unfurl_links: false
slack-optional-unfurl_media: false slack-optional-unfurl_media: false