spacedentist / spr

Submit pull requests for individual, amendable, rebaseable commits to GitHub
https://getcord.github.io/spr/
MIT License
378 stars 33 forks source link

Do not enforce that pull requests have been approved on land #67

Closed sven-of-cord closed 2 years ago

sven-of-cord commented 2 years ago

If you want that only approved pull requests can be landed, you should configure your GitHub repository accordingly. We can remove the check in spr. If you attempt to land an unapproved pull request, spr will show you the error it got in response to the API merge command. If you choose to not have this restricition in your repository, spr should allow you to land a pull request, even if it wasn't approved.

The old behaviour, where spr refuses to land an unapproved pr, can be restored by setting git config spr.requireApproval true.

Test Plan: submit this commit for code review with spr diff and immediately try to spr land. The spr repository is configured on GitHub to require all changes to be approved, so spr land should show an error. Once this PR is approved, use spr land to merge.