azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Don't allow the creation of empty pull requests (No changed files)

Open Vicropht opened this issue 3 years ago • 4 comments

Is your feature request related to a problem? Please describe. When I create a pull request through the pipeline, there is no check to see if the PR has any changes, this leads to a blank PR with no file changes. The web version doesn't allow the creation of empty PRs, so it would make sense to be the same in the CLI.

Describe the solution you'd like Do not allow the creation of PRs that have no changes.

Vicropht avatar Feb 02 '22 11:02 Vicropht

@jiasli for awareness

yonzhan avatar Feb 02 '22 12:02 yonzhan

Having the same issue as reported, are there any progress for this feature?

Amotti6 avatar Aug 08 '23 15:08 Amotti6

I think otherwise i.e. I wish an empty PR could be created from UI too. An empty PR would be valuable to just provide additional feedback/confirmation from the team (e.g. through PR templates).

andrzejmartyna avatar May 15 '24 12:05 andrzejmartyna

Agree with the people who want to create empty PRs. I am annoyed the web version doesn't allow doing so so I found this workaround:

  1. Create a PR into another branch where there are changes -- you can't create a PR without changes
  2. Switch to the branch where there is no changes
  3. Refresh the PR.
  4. Check that the Files tab shows "This commit contains no changed files" -- as expected
  5. Now you have an empty PR

PavelJ89 avatar Jun 08 '25 23:06 PavelJ89