Reputation: 81
Suppose I am working on branch called feature_one
, and I have an existing pull request on Github, someone comments on it and requests changes.
So I amend the commit in feature_one
with the change and do git push origin -f feature_one
so it goes to the remote branch. However, I don't want it reviewed yet, but it still notifies reviewers, how do I avoid this?
In other words, how do I preview the whole pull request and manually send it for review rather than auto send with a push to remote?
Upvotes: 1
Views: 4981
Reputation: 31117
You have to convert back you pull request to a draft to prevent reviewer to be notified.
a draft pull request will suppress notifications to those reviewers until it is marked as ready for review.
Source: https://github.blog/2019-02-14-introducing-draft-pull-requests/
Upvotes: 7
Reputation: 241768
First check whether the project defines any rules regarding PRs and reviews. It's possible you aren't the first person in such a situation and there's already a process to handle it.
Here's one possible approach:
Create another branch, work on it while the PR is not ready for review just to save the progress. Once the work is ready, merge* it into the original branch you opened the pull request from, which will notify the reviewer.
* You can also just reset --hard
the branch to the working one.
Upvotes: 0
Reputation: 1144
hmm, you can update your PR to remove reviewer, then add they back when you're confident that PR ready. If you not confident then I prefer you decline your PR then recreate when you confident your code OK
But once you commit and make a PR, should test everything both (unit test & automation/manual test all scenario). At least your PR should not have bad mistakes, you can install sonarlint to help some general issues
Upvotes: 0