create-pull-request icon indicating copy to clipboard operation
create-pull-request copied to clipboard

Two distinct PRs are created for the same branch and base

Open franciscohanna92 opened this issue 3 years ago • 3 comments

Running this action twice for the same branch and base creates two distinct PRs. Is this the expected behavior?

franciscohanna92 avatar Aug 31 '21 16:08 franciscohanna92

It wasn't designed as a feature per se but generally, I would say yes this is expected behaviour. GitHub's UI allows you to open to PRs for the same branch as well.

thomaseizinger avatar Sep 02 '21 06:09 thomaseizinger

I see. The thing that seems strange is that only the PRs created to main branch are being duplicated for me. I have an action that creates a PR to develop and a PR to main, and if I run that action several times, only the ones to master are being duplicated. I'm creating the one to develop as a draft, could that make the difference?

franciscohanna92 avatar Sep 02 '21 13:09 franciscohanna92

I see. The thing that seems strange is that only the PRs created to main branch are being duplicated for me. I have an action that creates a PR to develop and a PR to main, and if I run that action several times, only the ones to master are being duplicated. I'm creating the one to develop as a draft, could that make the difference?

Potentially :) I haven't tested all these cases against GitHub's API to be honest.

Maybe have a look at GitHub's CLI as well. It comes pre-installed in all virtual environments and may have a feature for not duplicating an existing PR.

thomaseizinger avatar Sep 02 '21 23:09 thomaseizinger