Mislav Marohnić
03533a167e
Merge pull request #2323 from towoe/pr-doc
...
[pr] Update argument description
2019-10-22 19:21:54 +02:00
Mislav Marohnić
6dc2d7945a
[checkout] Avoid overriding existing branch merge config
2019-10-22 17:56:07 +02:00
Mislav Marohnić
9170180900
[checkout] Handle case when PR matches the current branch
2019-10-22 17:48:58 +02:00
Tobias Wölfel
ddf4d74bde
[pr] Update argument description
2019-10-22 17:34:52 +02:00
Mislav Marohnić
cd81a7bada
Merge pull request #2313 from sinisterstuf/no-coauthor
...
Strip co-author from PR descriptions
2019-10-21 23:56:42 +02:00
Mislav Marohnić
1776120510
Tweak "co-authored-by"/"signed-off-by" regex
...
This edit makes sure that the code is greppable when "co-authored-by" or "signed-off-by" search terms are used.
2019-10-21 23:44:32 +02:00
Mislav Marohnić
87a31b093b
Merge branch 'gist'
2019-10-21 22:25:25 +02:00
Mislav Marohnić
0c246f6ef5
[gist] Fix formatting of examples in docs
2019-10-21 22:23:14 +02:00
Mislav Marohnić
a93eb6e2f6
[gist] Fix docs formatting
...
Ref. 1d64937256
2019-10-21 22:22:59 +02:00
Phil Dibowitz
5636676c98
put check back
2019-10-21 10:47:57 -07:00
Siôn le Roux
959ee10b25
Don't match end of line
...
You can't hafe EOL multiple times on the same line...
2019-10-19 00:15:22 +02:00
Siôn le Roux
5e2dda9e3e
Stop match at first new-line
2019-10-18 23:59:54 +02:00
Siôn le Roux
feb4cb5c71
Try with less escaping
2019-10-18 23:47:58 +02:00
Siôn le Roux
f8c531a85f
Strip co-author from PR descriptions
...
The Signed-off-by string already gets stripped, so I extended the
regular expression to also match Co-authored-by.
Resolves #2311
2019-10-18 23:35:03 +02:00
Phil Dibowitz
1d64937256
Various fixes
...
* Fix formatting of long-help
* Print out files in alphabetical order
* Allow not specifying file if there's only one
2019-10-18 09:10:11 -07:00
Mislav Marohnić
55de0a03da
[gist] List shorthand flags in usage synopsis
2019-10-18 13:28:24 +02:00
Mislav Marohnić
b7dc8e0b0e
[gist] Support `--browse`, `--copy`, and `--noop` flags
2019-10-18 13:19:49 +02:00
Mislav Marohnić
5dd4ac94b4
[gist] Remove the `--json` flag
...
The `gist show --json` representation wasn't the full JSON payload of
a gist. For programmatic use of gists, `hub api` is better:
hub api gists/:id | jq '.files | keys'
This will output JSON exactly as it's received from the API and it frees
us from having to reimplement parts of this functionality within `gist`.
2019-10-18 12:29:30 +02:00
Mislav Marohnić
603a731aa4
[gist] Use first configured API hosts instead of prompting
...
If hub is configured with multiple hosts (usually including GitHub
Enterprise instances), every invocation to `hub gist` would prompt to
select a host. Assume that people want to use the first configured host
by default (they can change it via GITHUB_HOST).
2019-10-18 12:16:28 +02:00
Mislav Marohnić
7f02e371f2
[gist] Tweaks docs
2019-10-18 11:59:09 +02:00
Phil Dibowitz
597604d777
fix help
2019-10-18 00:11:29 -07:00
Phil Dibowitz
2507852e48
update tests
2019-10-18 00:09:52 -07:00
Phil Dibowitz
194be2ae9f
code review bits
2019-10-17 23:59:27 -07:00
Mislav Marohnić
2158b17a71
[pr] Improve docs
...
[ci skip]
2019-10-08 13:17:43 +02:00
Mislav Marohnić
48092d4f5e
[pr show] Avoid duplicate API requests
2019-10-08 13:02:35 +02:00
Tom Lazar
dcf47d6cae
add format option to `git pr show`
2019-10-07 20:27:08 -05:00
Mislav Marohnić
9e7f3920db
[gist] Rename variables to camelCase
2019-10-07 13:51:38 +02:00
Mislav Marohnić
dffd80c585
[gist] Print files in consistent alphabetical order
2019-10-07 13:19:25 +02:00
Mislav Marohnić
ecea276617
[gist] Enable command outside the context of a repo
2019-10-07 12:49:09 +02:00
Mislav Marohnić
f6ebe22633
[gist] Improve error handling on create operation
2019-10-07 12:31:43 +02:00
Phil Dibowitz
c9f3dc0c23
Code review fixes
...
* Stop using GenericAPIRequest
* Move GH interactions and structs to `client.go`
* Catch scopes problems
2019-10-05 16:11:54 -07:00
Mislav Marohnić
9b013c8131
[compare] Allow slash in branch names
...
Ref. #1697
2019-10-01 17:07:26 +02:00
Mislav Marohnić
11f506b4dc
[compare] Improve documentation
2019-10-01 16:54:22 +02:00
Mislav Marohnić
1282f19c71
[compare] Improve upstream branch detection & error messages
...
- Correctly detect when the current branch is pushed to a fork
- Support upstream configuration with full remote URL
- More precise errors instead of just printing usage synopsis:
- no current branch
- the current branch doesn't seem pushed to a remote
- the current branch is the same as the default branch
- `--base` value is the same as current branch
2019-10-01 16:45:53 +02:00
Mislav Marohnić
4813e859ae
[docs] Clarify `--message`, `--file`, and `--edit` flags
2019-09-29 10:59:09 +02:00
Phil Dibowitz
1e35be83c1
Make a gist command
...
This addresses #2226 and #2116 by creating a `gist` subcommand.
This allows you to both create and retrieve gists. When creating a gist
it can be public or private.
In order to do this, the `gist` scope is added to the token we request.
Closes : #2226
Closes : #2116
Signed-off-by: Phil Dibowitz <phil@ipom.com>
2019-09-16 23:55:58 -07:00
whuang8
3b97144f70
[api] Replace all occurrences of `{owner}` and `{repo}`
2019-08-23 15:18:00 +02:00
Jeremy Pry
4e903f801f
Add quotes around branch name in warning
2019-08-20 10:48:28 -04:00
Jeremy Pry
2da382e555
Use consistent quotes around branch names
...
Fixes #2233 .
2019-08-20 10:44:54 -04:00
Mislav Marohnić
1787dd9de1
Merge pull request #2225 from whuang8/pr-list-comments-removal
...
Remove NC/Nc from pr list formatting
2019-08-20 09:42:59 +02:00
whuang8
6a7b8c7a60
Remove added whitespace
2019-08-19 20:40:44 -05:00
whuang8
858d487006
Remove unnecessary function
2019-08-19 20:39:29 -05:00
Mislav Marohnić
3edbd86fab
Merge pull request #2218 from tpope/empty-alias-error
...
Fix error message on hub --paginate
2019-08-19 15:41:56 +02:00
Mislav Marohnić
55f886ccb2
Merge pull request #2206 from muesli/assignment-fixes
...
Fixed ineffectual assignments in tests
2019-08-19 15:27:51 +02:00
whuang8
8d74db79c3
Remove NC/Nc from pr list formatting
2019-08-13 23:06:59 -05:00
Tim Pope
cf4772eed0
Fix error message on hub --paginate
...
Calling hub with one or more options but no subcommand resulted in the
following error message trying to expand an empty string as an alias:
error: key does not contain variable name: alias.
This fixes the root cause: attempting to retrieve an invalid config key.
2019-08-03 18:25:56 -04:00
Christian Muehlhaeuser
2fdb738a9d
Fixed ineffectual assignments in tests
...
Don't assign values we don't end up checking.
2019-07-23 09:31:17 +02:00
Christian Muehlhaeuser
f0c3ce9fb3
Simplify code
...
- Use bytes.Equal instead of bytes.Compare
- Use time.Since instead of manual timestamp subtracting
- Use sort.Strings instead of sort.StringSlice
- No need to specify the len of the slice
2019-07-23 09:28:32 +02:00
Mislav Marohnić
6a13adf2cc
[help] Enable `man` appearing in path that has spaces
...
Avoids shell-splitting manProgram unless the value was read from the
$PAGER environment variable.
2019-06-28 21:41:26 +02:00
Mislav Marohnić
ce213d7c8f
[env] Enable quoted values with spaces in $BROWSER
...
Makes possible:
BROWSER='"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --extra --flag' hub browse
Fixes #2178
2019-06-28 21:41:17 +02:00