Don't allow the creation of empty pull requests (No changed files)
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.
@jiasli for awareness
Having the same issue as reported, are there any progress for this feature?
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).
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:
- Create a PR into another branch where there are changes -- you can't create a PR without changes
- Switch to the branch where there is no changes
- Refresh the PR.
- Check that the Files tab shows "This commit contains no changed files" -- as expected
- Now you have an empty PR