mirror of
https://github.com/Sea-Haven-Industries/afterhours-shift-manager.git
synced 2026-10-06 13:32:04 +00:00
Fix timezone mismatch in version bump PR filter and use dynamic canvas URL
The date comparison used git's author date in its stored timezone (e.g. -04:00) against GitHub API mergedAt values in UTC (Z suffix). Lexicographic string comparison across different timezone formats caused every PR from the tagged commit's day to be re-included in subsequent versions. Normalize to UTC with format-local so both sides match. Also replace the hardcoded canvas URL with the CANVAS_ID env var already available in the step.
This commit is contained in:
parent
5bc5cc9131
commit
fbabab9692
1 changed files with 2 additions and 2 deletions
4
.github/workflows/deploy-notify.yml
vendored
4
.github/workflows/deploy-notify.yml
vendored
|
|
@ -58,7 +58,7 @@ jobs:
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LAST_TAG_DATE=$(git log -1 --format=%aI "$LAST_TAG")
|
LAST_TAG_DATE=$(TZ=UTC git log -1 --date=format-local:'%Y-%m-%dT%H:%M:%SZ' --format='%ad' "$LAST_TAG")
|
||||||
PRS=$(gh pr list --state merged --json number,title,mergedAt \
|
PRS=$(gh pr list --state merged --json number,title,mergedAt \
|
||||||
--jq "sort_by(.number) | .[] | select(.mergedAt > \"$LAST_TAG_DATE\")")
|
--jq "sort_by(.number) | .[] | select(.mergedAt > \"$LAST_TAG_DATE\")")
|
||||||
|
|
||||||
|
|
@ -158,7 +158,7 @@ jobs:
|
||||||
VERSION: ${{ steps.changes.outputs.version }}
|
VERSION: ${{ steps.changes.outputs.version }}
|
||||||
SLACK_BULLETS: ${{ steps.changes.outputs.slack_bullets }}
|
SLACK_BULLETS: ${{ steps.changes.outputs.slack_bullets }}
|
||||||
run: |
|
run: |
|
||||||
CANVAS_URL="https://app.slack.com/docs/F0B13V3EBUN"
|
CANVAS_URL="https://app.slack.com/docs/${CANVAS_ID}"
|
||||||
read -r -d '' TEXT <<ENDTXT || true
|
read -r -d '' TEXT <<ENDTXT || true
|
||||||
*After-Hours Scheduler has been updated to ${VERSION}*
|
*After-Hours Scheduler has been updated to ${VERSION}*
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue