-
Notifications
You must be signed in to change notification settings - Fork 252
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
Add customize PR branch name #370
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 813d004 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
branchName: | ||
description: Sets the branch name for the pull request. Default to `changeset-release/{{$github.ref_name}}` | ||
required: false | ||
branch: | ||
description: Sets the branch in which the action will run. Default to `github.ref_name` if not provided |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those 2 inputs are too close to each other
}: VersionOptions): Promise<RunVersionResult> { | ||
const octokit = setupOctokit(githubToken); | ||
|
||
let repo = `${github.context.repo.owner}/${github.context.repo.repo}`; | ||
branch = branch ?? github.context.ref.replace("refs/heads/", ""); | ||
let versionBranch = `changeset-release/${branch}`; | ||
let versionBranch = branchName ?? `changeset-release/${branch}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem with this is that we rely on changeset-release/*
being the versioning branch:
https://github.com/changesets/bot/blob/492290be72c42ae8f9ba85afe636a7b4520a9909/index.ts#L138-L142
As of previous PR #255, it's possible to trigger the Changeset Pull Request process from a branch other than
baseBranch
. Thanks for this, it's really useful 🙏If two branches want to merge into
baseBranch
, the PR branch name will always bechangeset-release/{{baseBranch}}
. In this case, the latest commit will override the branch.But sometimes we just want two different branches. For example, in a Git workflow where the release can come from the
develop
branch or thehotfixes
branch.It should be possible to do this workflow with this PR