Update test-assistant-api-rest-change-tracker.yml

add milestone information to slack notification
This commit is contained in:
nigeljamesstevenson 2023-10-05 09:50:06 +01:00 committed by GitHub
parent 2c738a59dd
commit 040ac64fb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -13,6 +13,15 @@ jobs:
- name: Wait 2 minutes for other labelling jobs to finish
run: sleep 2m
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
uses: archive/github-actions-slack@d9dae40827adf93bddf939db6552d1e392259d7d
id: notify
@ -22,5 +31,7 @@ jobs:
slack-text: |
<${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>
*Labels:* ${{ join(github.event.pull_request.labels.*.name, ', ') }}
*Milestone:* ${{ steps.get-milestone.outputs.milestone_title }}
*Milestone Description:* ${{ steps.get-milestone.outputs.milestone_description }}
slack-optional-unfurl_links: false
slack-optional-unfurl_media: false