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

fix: Fix base branch identifier for pull requests in release workflow #16

Merged
merged 1 commit into from
Mar 8, 2022
Merged

fix: Fix base branch identifier for pull requests in release workflow #16

merged 1 commit into from
Mar 8, 2022

Conversation

pchila
Copy link
Contributor

@pchila pchila commented Mar 8, 2022

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 chomps everything before a / in the
current GITHUB_REF (which contains refs/heads/<branchname> or
refs/tags/<tagname>). This mangles the branch name if it contains a
/ character so we use GITHUB_REF_NAME instead which does not contain
any refs prefix.

Signed-off-by: Paolo Chila [email protected]

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/<branchname> or
refs/tags/<tagname>). 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 <[email protected]>
Copy link
Member

@christian-kreuzberger-dtx christian-kreuzberger-dtx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pchila pchila merged commit 605b380 into keptn:main Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants