Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/release-hotfix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ jobs:
if: ${{ !inputs.dry_run && steps.cherry.outputs.picked_count != '0' }}
env:
GH_TOKEN: ${{ secrets.RELEASE_PAT }}
# Pass via env (not ${{ }} interpolation) so the literal
# backticks inside SOURCE_DESC don't get re-evaluated by
# bash as command substitution.
SOURCE_DESC: ${{ steps.cherry.outputs.source_desc }}
run: |
set -euo pipefail
HOTFIX='${{ steps.plan.outputs.hotfix_branch }}'
Expand All @@ -272,7 +276,7 @@ jobs:
{
echo "Automated hotfix candidate built off \`${BASE}\`."
echo ""
echo "- **${PICKED}** commit(s) cherry-picked from \`dev\` (${{ steps.cherry.outputs.source_desc }})"
echo "- **${PICKED}** commit(s) cherry-picked from \`dev\` (${SOURCE_DESC})"
[[ "${DEDUP}" != "0" ]] && echo "- ${DEDUP} already applied to \`${HOTFIX}\` (skipped, see below)"
[[ "${SKIPPED_BREAKING}" != "0" ]] && echo "- ${SKIPPED_BREAKING} breaking change(s) skipped (see below)"
[[ "${CONFLICTS}" != "0" ]] && echo "- ⚠️ **${CONFLICTS}** commit(s) failed to cherry-pick (see below)"
Expand Down Expand Up @@ -308,6 +312,13 @@ jobs:
echo "See: [Hotfix Release Process](https://github.com/${{ github.repository }}/wiki/Developers#hotfix-release-process)"
} > /tmp/pr-body.md

# Best-effort: ensure the hotfix label exists so --label
# doesn't fail the workflow on repos that haven't created it.
gh label create hotfix \
--repo '${{ github.repository }}' \
--color ededed \
--description "Hotfix candidate" 2>/dev/null || true

gh pr create \
--repo '${{ github.repository }}' \
--base "${HOTFIX}" \
Expand Down
Loading