changesets / action

682 stars 242 forks source link

Suggestion: add input to specify the target branch #368

Open prenaissance opened 5 months ago

prenaissance commented 5 months ago

Proposal

I would like to have a new option to specify the base branch of the PR.

\- name: Create Release Pull Request
  uses: changesets/action@v1
  with:
    version: npm run changeset:version
    publish: npm run changeset:tag
    createGithubReleases: false
+   baseBranch: main # default - ${{github.ref}}
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Context

Let's suppose that I want to do a release and on the main branch I have 4 features, 1 of which i know has a bug. I would cherry-pick the needed features in an RC-X.X.X branch, run the changeset version and tag commands, release from that branch and synchronize with main. With this action, I cannot currently do that because the PR is always opened into the branch that the action is run upon.