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

Create MR with a custom target branch #69

Closed
lluiscab opened this issue Oct 26, 2022 · 7 comments · Fixed by #70
Closed

Create MR with a custom target branch #69

lluiscab opened this issue Oct 26, 2022 · 7 comments · Fixed by #70

Comments

@lluiscab
Copy link
Contributor

Right now, the MR is created with the target branch being the same as the one that's running the CI.

In our case, we use a branch dev for development and we'd like to merge all changes into main using the MR that changeset created. Problem is as I said, the target branch is always dev as it's using CI_COMMIT_REF_NAME. Could an option be added to specify a custom target branch? (Similar to how changeset has a baseBranch configuration option for comparisons)

As this is a quite simple change, I'd be uo tp opening a PR with such changes, maybe with a new INPUT_TARGET_BRANCH env variable?

@JounQin
Copy link
Member

JounQin commented Oct 26, 2022

It seems different with the original GitHub Action? Maybe it's worth to discuss this at https://github.com/changesets/action first?

@lluiscab
Copy link
Contributor Author

See: changesets/action#88 (comment)

@JounQin
Copy link
Member

JounQin commented Oct 26, 2022

@lluiscab

Thanks, then PR welcome to see how simple the change is.

@lluiscab
Copy link
Contributor Author

Is there any documentation on how to develop and test on this project? Even tho it seems to be an easy change to implement, I'd really like to test any changes before opening a PR

@JounQin
Copy link
Member

JounQin commented Oct 27, 2022

Sorry, but no document yet. You can just raise the PR, then a codesandbox CI installation usage like #66 (comment) would be available to test on your own repository.

@lluiscab
Copy link
Contributor Author

Okay. I'll see if I can opena PR today.

Regarding the implementation, it makes sense to want to use the baseBranch config option from .changeset/config.json but I have a fear that doing so might break current installations. The other option is to use a INPUT_MR_TARGET_BRANCH environment variable. Which one would you go for?

@JounQin
Copy link
Member

JounQin commented Oct 27, 2022

A new env INPUT_MR_TARGET_BRANCH seems fine to me, as you said baseBranch can be just broken.

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 a pull request may close this issue.

2 participants