Skip to content
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

Simplify jetbrains-release.yml PR body for changelog update #310

Merged
merged 1 commit into from
Jun 1, 2024
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
16 changes: 1 addition & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,9 @@ jobs:
git commit -am "Changelog update - $VERSION"
git push --set-upstream origin $BRANCH

# NOTE: THE BELOW PR DESCRIPTION IS TO GIVE DETAILS ON A WORKAROUND FOR A WORKFLOW-CREATED PR TO TRIGGER
# SUBSEQUENT WORKFLOWS. SEE LINK BELOW FOR MORE DETAILS AND OTHER ALTERNATIVES:
#
# URL: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs
#
# Moving sed prog into variables; see https://stackoverflow.com/a/25021905
SED_PROG1='s/^[[:space:]]*$//g'
SED_PROG2='/./,$!d'
# Unquoted heredoc to allow for variable expansion for $VERSION; see https://stackoverflow.com/a/4938198
PR_BODY="$(cat <<-EOM | sed -e $SED_PROG1 -e $SED_PROG2
Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version.
EOM
)"

gh pr create \
--title "Changelog update - \`$VERSION\`" \
--body "$PR_BODY" \
--body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \
--reviewer ChrisCarini \
--base main \
--label "merge when passing" \
Expand Down