From 605b380b1e7fb04c50d54d8bf9bb347c74c6277f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paolo=20Chil=C3=A0?= Date: Tue, 8 Mar 2022 09:50:52 +0100 Subject: [PATCH] fix: Fix base branch identifier for pull requests in release workflow (#16) When releasing from branches containing a `/` the gh CLI call to open a pull request specified an invalid base branch by passing `--base "${GITHUB_REF##*/}"` which would chomp everything before a `/` in the current GITHUB_REF (which contains refs/heads/ or refs/tags/). This would mangle the branch name if it contains a `/` character so we use GITHUB_REF_NAME instead which should not contain any prefix. Signed-off-by: Paolo Chila --- .github/workflows/release-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-integration.yml b/.github/workflows/release-integration.yml index d810deb..6769be1 100644 --- a/.github/workflows/release-integration.yml +++ b/.github/workflows/release-integration.yml @@ -89,7 +89,7 @@ jobs: RELEASE_TAG: ${{ steps.create-release-package.outputs.tag-name }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh pr create --title "chore: Release notes for $RELEASE_TAG" --body "**This is an automated PR for release notes of $RELEASE_TAG!**" --base "${GITHUB_REF##*/}" + gh pr create --title "chore: Release notes for $RELEASE_TAG" --body "**This is an automated PR for release notes of $RELEASE_TAG!**" --base "${GITHUB_REF_NAME}" - name: Create GitHub Release