devmasx / merge-branch

A GitHub Action that merge PR branch to other branchs
161 stars 58 forks source link

Feature: Ability to replace a branch instead of merge #37

Open TSMMark opened 1 year ago

TSMMark commented 1 year ago

Thanks for this awesome gh action. Been using it for years now


I have a new workflow idea and I want to force push / replace another branch with the current branch. (rather than merge into)

It seems pretty close to the current API so I thought maybe it could just be another option, e.g.

- name: deploy/stage-a
  uses: devmasx/merge-branch@v1.3.1
  with:
    label_name: 'deploy stage-a'
    from_branch: ${{ env.GITHUB_HEAD_REF_SLUG }}
    target_branch: 'deploy/stage-a'
    github_token: ${{ github.token }}
    replace: true

Thoughts on what it would take to implement this? Could it be accepted?

shadoath commented 1 year ago

Or can there be a force option?