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

Add switches to create to allow for manipulating title and body of the request #50

Open
digitaltom opened this issue May 23, 2013 · 7 comments

Comments

@digitaltom
Copy link

It would be cool if git review uses by default (when not entering anything) the commit
message of the last commit as name.

@blegat
Copy link
Contributor

blegat commented May 23, 2013

I like the idea, let me try to extend it a little bit.

Maybe we could do something similar to what git commit does which is,

  • when no title is given, launch a text editor and do nothing what's saved is blank
  • give options like -m for custom output,
  • -l for last commit message and
  • -s for the current generated title.

What would be even better is an option like -t for launching a text editor (which would be the default because it is safer since the user can still undo easily in case of mistake) and then the possibility for the user to change that default in its config file (either ~/.gitconfig or ~/.git_review.yml that could be edited by git review config ...).

@b4mboo
Copy link
Owner

b4mboo commented May 23, 2013

If you only have one commit, it does that already. Of you have more, you get a list of your commits. I like the idea of adding switches like -m etc. though.

@digitaltom
Copy link
Author

On 23.05.2013 19:37, Bamboo wrote:

If you only have one commit, out does that already. Of you have more, you get a list of your commits. I like the idea of adding switches like -m though.


Reply to this email directly or view it on GitHub #50 (comment).

You're right, it already did. I got confused by the branch name, which did not get
the commits name.

@b4mboo
Copy link
Owner

b4mboo commented Jun 20, 2013

I will change the issue title (to preserve the existing discussion) and add this as a feature request.

For the sake of protocol, this is the original title: "fallback pull request title to commit message"

@b4mboo
Copy link
Owner

b4mboo commented Jun 20, 2013

Which switches do we want to implement?

I like -t for the request's title and -b for the request's body / description. Maybe even --auto to go with the auto-generated values. Opening a text editor is the default anyways. So only if we allow this to be changed through some options we can think of a switch to get the default back. Maybe --no-auto or --manual.

Opinions?

@blegat
Copy link
Contributor

blegat commented Jun 21, 2013

So

$ ... -t "Title" -b "Body"

would have the title "Title" and the body "Body"

$ ...

would launch a text editor. The first line would be the title and the remaining the body ? Or it would be the title until there is an empty line and then the body ?
With

$ ... -t "Title"

We would launch a text editor with the first line prefilled and the same -b "Body".

Maybe we should try to be like git commands the more as possible since git-review is integrated into it.

@b4mboo
Copy link
Owner

b4mboo commented Aug 30, 2013

OK, so let's go with -t and -b for the beginning and forget about the rest until we have a real use case for it.

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

3 participants