Skip to content

tools: improve release proposal PR opening #56128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion .github/workflows/create-release-proposal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
RELEASE_BRANCH: v${{ inputs.release-line }}.x
RELEASE_DATE: ${{ inputs.release-date }}
RELEASE_LINE: ${{ inputs.release-line }}
RELEASER: ${{ github.actor }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -79,6 +80,6 @@ jobs:

- name: Start git node release prepare
run: |
./tools/actions/create-release.sh "${RELEASE_DATE}" "${RELEASE_LINE}"
./tools/actions/create-release.sh "${RELEASE_DATE}" "${RELEASE_LINE}" "${RELEASER}"
env:
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
3 changes: 2 additions & 1 deletion tools/actions/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -xe

RELEASE_DATE=$1
RELEASE_LINE=$2
RELEASER=$3

if [ -z "$RELEASE_DATE" ] || [ -z "$RELEASE_LINE" ]; then
echo "Usage: $0 <RELEASE_DATE> <RELEASE_LINE>"
Expand All @@ -21,7 +22,7 @@ TITLE=$(awk "/^## ${RELEASE_DATE}/ { print substr(\$0, 4) }" "doc/changelogs/CHA
# Use a temporary file for the PR body
TEMP_BODY="$(awk "/## ${RELEASE_DATE}/,/^<a id=/{ if (!/^<a id=/) print }" "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md")"

PR_URL="$(gh pr create --title "$TITLE" --body "$TEMP_BODY" --base "v$RELEASE_LINE.x")"
PR_URL="$(gh pr create --draft --title "$TITLE" --body "$TEMP_BODY" --base "v$RELEASE_LINE.x" --assignee "$RELEASER" --label release)"

# Amend commit message so it contains the correct PR-URL trailer.
AMENDED_COMMIT_MSG="$(git log -1 --pretty=%B | sed "s|PR-URL: TODO|PR-URL: $PR_URL|")"
Expand Down
Loading