Update test-assistant-api-with-date.yml
This commit is contained in:
parent
1c30563ffc
commit
292cd5cb5a
|
@ -34,9 +34,40 @@ jobs:
|
|||
|
||||
# Calculate the date for the next Thursday after the merge
|
||||
THURSDAY_AFTER_MERGE=$(date -u -d "${{ github.event.pull_request.merged_at }} + $DAYS_UNTIL_NEXT_THURSDAY days" +"%Y-%m-%d")
|
||||
TEST_DATE_MESSAGE="Can be tested from: Thursday, $THURSDAY_AFTER_MERGE"
|
||||
TEST_DATE_MESSAGE="Can be tested from: Thursday, $THURSDAY_AFTER_MERGE. (Targeting release on **)"
|
||||
echo "TEST_DATE_MESSAGE=${TEST_DATE_MESSAGE}" >> $GITHUB_ENV
|
||||
|
||||
- name: Determine Milestone Date
|
||||
id: get_milestone_date
|
||||
run: |
|
||||
#!/bin/bash
|
||||
|
||||
MILESTONE_TITLE="${{ github.event.pull_request.milestone.title }}"
|
||||
MILESTONE_DATE="Undefined"
|
||||
|
||||
# Mapping of milestone titles to release dates
|
||||
declare -A MILESTONE_DATES
|
||||
MILESTONE_DATES=(
|
||||
["8.1.0"]="2023-09-12"
|
||||
["8.2.0"]="2023-10-10"
|
||||
["8.3.0"]="2023-11-14"
|
||||
["8.4.0"]="2023-12-12"
|
||||
["8.5.0"]="2024-01-09"
|
||||
["8.6.0"]="2024-02-13"
|
||||
["8.7.0"]="2024-03-12"
|
||||
["8.8.0"]="2024-04-09"
|
||||
["8.9.0"]="2024-05-14"
|
||||
["9.0.0"]="2024-06-11"
|
||||
)
|
||||
|
||||
# Check if the milestone title exists in our predefined list and get the date
|
||||
if [[ -v "MILESTONE_DATES[${MILESTONE_TITLE}]" ]]; then
|
||||
MILESTONE_DATE=${MILESTONE_DATES[${MILESTONE_TITLE}]}
|
||||
fi
|
||||
|
||||
# Export for later steps
|
||||
echo "MILESTONE_DATE=${MILESTONE_DATE}" >> $GITHUB_ENV
|
||||
|
||||
# Notify Slack Step
|
||||
- name: Notify Slack
|
||||
uses: archive/github-actions-slack@d9dae40827adf93bddf939db6552d1e392259d7d
|
||||
|
@ -47,9 +78,9 @@ jobs:
|
|||
slack-text: |
|
||||
<${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>
|
||||
*Labels:* ${{ join(github.event.pull_request.labels.*.name, ', ') }}
|
||||
*Milestone:* <${{ github.event.pull_request.milestone.html_url }}|${{ github.event.pull_request.milestone.title }}>
|
||||
*Milestone:* <${{ github.event.pull_request.milestone.html_url }}|${{ github.event.pull_request.milestone.title }}> (Release Date: ${{ env.MILESTONE_DATE }})
|
||||
*${{ env.TEST_DATE_MESSAGE }}*
|
||||
Please visit the <#${{ secrets.WOO_CORE_RELEASES_SLACK_CHANNEL }}> to obtain the latest build for testing.
|
||||
Please visit the <#${{ secrets.WOO_CORE_RELEASES_SLACK_CHANNEL }}> to obtain the latest WooAF build for testing.
|
||||
slack-optional-unfurl_links: false
|
||||
slack-optional-unfurl_media: false
|
||||
|
||||
|
|
Loading…
Reference in New Issue