Skip to content
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

Ability to write more detailed review comments #8

Closed
hazbo opened this issue Dec 16, 2015 · 5 comments
Closed

Ability to write more detailed review comments #8

hazbo opened this issue Dec 16, 2015 · 5 comments

Comments

@hazbo
Copy link
Contributor

hazbo commented Dec 16, 2015

When writing a comment on a review, you're able to pass -m followed by the message, as you'd expect. The <file> and <line> at this point are both optional however, so something like the following would be fine:

git appraise comment -m "Nice code!" 2c9bff89f0f8

Would it be unreasonable to suggest allowing the commenter to leave out the -m, much like how you'd write a proper commit message, by opening the text editor associated with git, to then write a more detailed comment?

@hazbo
Copy link
Contributor Author

hazbo commented Dec 16, 2015

I noticed that the message is not actually required for a comment, is this the case due to there being both -lgtm and -nmw available instead of a message? If so, should it be the case that if either of those flags haven't been set, that a message is required?

@ojarjur
Copy link
Collaborator

ojarjur commented Dec 16, 2015

That's a really good point.

Actually, I might state it more strongly than you have; posting a -nmw comment with no message is not helpful, and an -lgtm comment with no message can be posted with the "accept" subcommand, so I'm fine with the first proposal (if -m is missing, then open an editor).

I think the only reason we aren't already doing that is just that it didn't occur to me.

ojarjur added a commit that referenced this issue Dec 16, 2015
Added error message for leaving empty comments
This commit requires that for a comment, if -lgtm AND -nmw have not been set a
comment must be.

As per #8 (comment)
@hazbo
Copy link
Contributor Author

hazbo commented Dec 16, 2015

That's weird you mention that, just earlier on I was thinking -nmw on it's own is actually really unhelpful. Maybe even a little rude!

So to be clear, are you proposing that the -lgtm (on it's own) is only going to be used with the accept subcommand? Or will it also still remain available for a comment too?

@ojarjur ojarjur closed this as completed Dec 16, 2015
@ojarjur ojarjur reopened this Dec 16, 2015
@ojarjur
Copy link
Collaborator

ojarjur commented Dec 16, 2015

So to be clear, are you proposing that the -lgtm (on it's own) is only going to be used with the accept subcommand? Or will it also still remain available for a comment too?

Yes, that's what I'm thinking. The accept command is just a shorthand for "comment -lgtm", so I'm fine with that being the only command that allows an empty comment.

@hazbo
Copy link
Contributor Author

hazbo commented Dec 16, 2015

Yeah that seems to make the most sense to me.

ojarjur added a commit that referenced this issue Dec 17, 2015
Force default git editor when omitting -m
For review comments, the absense of the -m flag will now attempt to load the
user's default git editor.

i.e. git appraise comment c0a643ff39dd

An initial draft as discussed in #8

I'm still not sure whether or not the file that is saved is in the most appropriate place or not. I like the idea of it being relative to the project although it could have gone in `/tmp` I suppose.
@ojarjur ojarjur closed this as completed Dec 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants