Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Enable to post body from command line when pull-request #256

Closed
wants to merge 1 commit into from

4 participants

@banyan

When PR, I would like to post body from command line without editor.
-b is already used by base, so add long option name all of these commands.

@banyan banyan enable to post body from command when pull-request
"-b" is already used by base, so add long option name all of these commands
01b3522
@westonruter

At least you should be able to specify the path to a file to use for the pull request title and body, where the first line is the title and then the second paragraph and afterward are the body. This is analogous to git commit -F commit-message.txt

@mislav
Admin

Agreed. But duplicate of #183. Let's continue the dicussion there

@mislav mislav closed this
@kyanny kyanny referenced this pull request from a commit in kyanny/hub
@kyanny kyanny Add ability to set body of pull request from command line option
This ability is same as #183 (made by @vhata) and #256 (made by @banyan).
The name of `-m` option imitates `git commit`.

Add test (cucumber feature), too.
7f84bcb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 3, 2012
  1. @banyan

    enable to post body from command when pull-request

    banyan authored
    "-b" is already used by base, so add long option name all of these commands
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/hub/commands.rb
View
10 lib/hub/commands.rb
@@ -95,16 +95,18 @@ def pull_request(args)
while arg = args.shift
case arg
- when '-f'
+ when '-f', '--force'
force = true
- when '-b'
+ when '-b', '--base'
base_project, options[:base] = from_github_ref.call(args.shift, base_project)
- when '-h'
+ when '-h', '--head'
head = args.shift
explicit_owner = !!head.index(':')
head_project, options[:head] = from_github_ref.call(head, head_project)
- when '-i'
+ when '-i', '--issue'
options[:issue] = args.shift
+ when '--body'
+ options[:body] = args.shift
else
if url = resolve_github_url(arg) and url.project_path =~ /^issues\/(\d+)/
options[:issue] = $1
Something went wrong with that request. Please try again.