-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rejecting/closing a request? #17
Comments
I don't have the answer; I'm new to the team. Our Tech Lead is on vacation Thanks for your question and interest! Barbara On Fri, Dec 18, 2015 at 7:21 PM, Nic West [email protected] wrote:
|
A requested review can be rejected by just passing the -nmw (needs more work) flag in a comment to that particular request. There is an Comments can still be added to a rejected review - as far as I know the history of these is maintained. The -nmw flag requires a message, as we agreed that it's pretty useless suggesting that more work needed to be done, but without providing any feedback. That being the case, the review will be rejected. I feel it wouldn't be a bad idea to create the reject subcommand to work in pretty much the same way as the accept one works, only it must require a comment and then it'd reject the review. Any thoughts on this? |
Sounds like a neat idea to me. I'll check with our Tech Lead when he's Thanks so much! Barbara On Sat, Dec 19, 2015 at 11:18 AM, Harry Lawrence [email protected]
|
Just a clarification about the design of lgtm/nmw, please correct me if I'm wrong. I am not sure this is what @nicwest meant:
Is this not about rejecting and discarding (still kept in history, but not to be submitted anymore) an entire review request? However, if we are talking about rejecting an individual comment thread, then read below. The proposed In that case, should the command not be called some synonym of |
I noticed @nicwest had been working on a vim plugin for git-appraise so I has assumed he might have been asking about how we may solve interfacing closing / rejection as a subcommand, much like how the accept subcommand works. I could be wrong here (so @nicwest please point give me a shout if I've missed the point!) @jishi9 as far I understand, after a review thread has been rejected it then can't be accepted afterwards. Create / report issue makes perfect sense given that the review state can be changed from rejected to accepted but I don't think this is (at least currently) how it works, although @ojarjur would be the best person to further clarify this. |
Yes, Omar would definitely be the best person to clarify this. I was assuming that the code review thread could contain something like:
All of this within one code review thread. Is your understanding different? Thanks! On Tue, Dec 22, 2015 at 4:04 PM, Harry Lawrence [email protected]
|
To me 'reject' means something like a) this change is so bad it needs to be done over from scratch b) this change is not applicable anymore. This is what I think @nicwest means, something like: For the workflow you described, I would use something like I also am not sure about where a NMW is applied. Is it to individual comments, or to the review as a whole? In the case of individual comments, I mean something like this: Filename: test.go ; Line: 13 The above comments would be created using the commands:
Or did you instead mean a workflow like this:
|
Ahhhh... If "reject" means the code needs to be redone from scratch, I I thought NMW applies to the entire code review -- not just individual Thanks! Barbara On Tue, Dec 22, 2015 at 5:07 PM, jishi9 [email protected] wrote:
|
Yes exactly. It seems that comments can be applied at the review level, file level, or line level. lgtm and nmw are applied to comments, and hence they can be applied to any of the three scopes. https://github.com/google/git-appraise/blob/master/commands/comment.go#L126 |
When a new comment is left and the If a file and line has been specified in a comment where the parent comment (-p) has also been set, the line will not show in the comment when running The A -nmw or -lgtm apply to the whole review, and not a single comment or thread. The review in question will change from To my understanding this is how it all works currently. Does this make sense? Thanks. |
the If there is effectively a helper command for accepting a request via the |
I agree with this. I think it's a fairly consistent approach with what is already there. |
@jishi9 I think your approach in regards to A practical example of where this kind of thing has already happened with this project in particular is where I wrote the code to load the default git editor, Omar was happy with it, although pointed out that I should change one small part of it. He didn't reject the whole review, just left a comment in regards to what should be changed and then accepted it. What are your thoughts on this? |
I checked this, and it looks like you are able to specify -lgtm and -nmw for any comment scope, with or without parents. N.B. it looks like
I am not 100% clear on how the status of a comment thread, or the status of the entire review, is calculated. For a comment thread I would assume something like
I think we first need to clarify the model of how a comment thread's status is (or should) calculated, and how a review's status is (or should) be calculated. Once the model is clear, we can then decide what actions make sense to build on top of that. |
This is what I tried, would you mind trying also and reporting back?
It's true, you're able to pass the -lgtm flag here, but I bet if you run that it won't change the status of the review to accepted, as it's not the first comment in that thread. |
Couldn't agree more with this. |
You're right. It seems that the status of the review follows the status of the last global comment. Probably still need to check how it interacts with in-file and inline comments.
|
+1 to clarifying the model and then documenting it! Barbara On Wed, Dec 23, 2015 at 5:31 AM, jishi9 [email protected] wrote:
|
I think there is another question in this thread: How to close or discard a review request ? I |
Thanks for bringing this up. Omar will be back from vacation on Monday. Barbara On Wed, Dec 30, 2015 at 5:35 AM, Shafreeck Sea [email protected]
|
Sorry for the confusion about the meaning of the resolved bit (which is what the "-lgtm" and "-nmw" flags set). @jishi9 got the intention exactly right in is issue comment here. The "rejected" status really just means something like "needs more work", but that wording seemed too cumbersome (and "nmw" is probably not obvious enough to use for a human-readable status message). There is no status that means something like "this request should never be merged". The closest you can get to that is to drop the review ref and have the commit be garbage collected. When that happens the request still exists in the history of the notes ref, but the tool will not display it. We could add a flag to the list and show commands to display reviews that have been abandoned in this way, but since the commit is gone they will not be able to show the diffs, so that's not a great option. What would probably be better would be to make the list command (by default) not show reviews that have a rejected status and have not been updated within some amount of time (e.g. 1 month). That would give us the option of keeping the commits around forever (if you want to do so), while still recognizing that the review has been abandoned, so it shouldn't clutter your command line output. |
Added a reject subcommand The reject subcommand adds a NMW comment to the review. Unlike the accept subcommand, this requires a comment. The -m flag can be passed to do this, or if no flag is passed it will open the default git text editor. This is what I have in mind in regards to #17
How does one go about hiding rejected reviews from the list of open reviews? Shouldn't rejected review be hidden from the "list" command with no arguments? It is in a state that can never be accepted, so shouldn't it only shown with the -a flag? If the purpose of it is that this code should be thrown away and never merged, why would it be considered in an unresolved "open" state? |
@cwmacdon This is an area where the tool could use improvement.
Right now you can't but this does reflect a use case I want to support.
I think that rather than hiding rejected reviews, we need to add another state a review can be in: abandoned. Those abandoned reviews would then be omitted from list output by default but still show up when listing with the -a flag. My thoughts on this subject have evolved as I've gotten more experience as a user of the tool, so this is different from what I was previously mentioned in the comment from Jan 4. This change would involve two things:
|
@ojarjur So the reviewer rejects the review, and then the original author sees the rejection and abandons the work. This sounds like a better workflow for the requester, rather than just seeing your pending review disappear from the list if rejected reviews did not show up there. |
@cwmacdon Yes, that's the general idea. |
This commit resolve google#17
Added abandon command This commit resolve #17 Added abandon command that add comment with **resolve = false** and remove TargetRef from Request. Added edit note command to `git.go` repository to update existing note. Added abandon status to `output.go` when Request.TargetRef is empty.
Hey team, what is the best approach to reject/close a request?
An argument could be made that keeping a history of comments on rejected requests might be useful so that mistakes are not repeated.
The text was updated successfully, but these errors were encountered: