Mislav Marohnić
4b53546070
Support `hub pr list --state=merged`
...
This queries by `state=closed` and selects only PRs that have a merged date.
2018-12-17 17:08:26 +01:00
Mislav Marohnić
f4252d55ec
Merge branch 'localhost'
2018-11-28 03:24:40 +01:00
Mislav Marohnić
be76a9f80f
Fix test broken by OAuth URL update
2018-11-28 03:20:10 +01:00
Mislav Marohnić
f98928699d
Add support for passing multiple `--message` options
...
This is for compatibility with git-commit(1)
2018-11-28 03:05:15 +01:00
Mislav Marohnić
de380c0e49
Fix tests broken by `hub remote add` changes
...
`remote add` may now query the GitHub API to determine whether the
remote URL should be generated in writeable mode or not.
2018-10-31 02:21:57 +01:00
Jonny Stoten
0dc077ac32
Use scissors to separate comments from PR messages
...
This allows PR templates to include markdown headers with '#'
2018-10-30 23:38:17 +01:00
Mislav Marohnić
5346928ac4
Merge pull request #1923 from royels/feature
...
Add the command `hub issue show <NUMBER>`
2018-10-30 23:28:42 +01:00
Mislav Marohnić
d5761b714b
Add `--format=<FORMAT>` functionality to `issue show`, `release show`
2018-10-30 23:19:53 +01:00
Mislav Marohnić
5285804c41
Code style
2018-10-30 23:19:53 +01:00
royels
6b5997f974
Add the command `hub issue view <NUMBER>`
...
This commit adds the subcommand hub issue view, which displays an issue as well as
lists its comments underneath.
2018-10-30 23:19:53 +01:00
Mislav Marohnić
b0d94c827d
`hub pull-request -r`: match requested teams by slug and not name
2018-10-30 11:18:01 +01:00
Mislav Marohnić
32aaacb67a
Include requested teams in `hub pr list -f %sr` view
2018-10-30 11:17:09 +01:00
Florian Thomas
ee0d675387
Add ability to list requested reviewers with `%rs`
...
Fixes #1913
2018-10-29 22:18:18 +00:00
Mislav Marohnić
b15d8de5e4
Ensure consistent sort direction when listing issues, PRs
...
The default direction when sorting by `created` date (the default) is
descending. However, the default on the API backend changes to ascending
when the sort key is something different than `created`:
https://developer.github.com/v3/pulls/#list-pull-requests
This ensures that the default `direction: "desc"` is always passed to
API queries, regardless of the sort key, unless `--sort-ascending` was used.
Ref. https://github.com/github/hub/issues/1815#issuecomment-433222344
2018-10-26 14:37:47 +02:00
Florian Thomas
ab4203ec05
fix `compare` command if not on any branch
...
There is no need to detect the current branch if a range is provided
as an argument.
Fixes #1584 .
2018-10-14 18:24:53 +01:00
Mislav Marohnić
3c8b674faa
Use canonical repo for `hub release` operations
...
For `hub release show`, `MainProject()` was used to fetch the canonical
repo of the current project. However, the `create`, `edit`, and `delete`
operations used `CurrentProject()` most likely by mistake. This caused
the `hub release edit` operation, for example, to be potentially
performed against a fork rather than the canonical repo, depending on
the currenly checked out branch.
Fixes #1881
2018-09-27 11:51:54 +02:00
Mislav Marohnić
d3ac6c474b
Fix `hub create` in place of a renamed repo
...
If you're trying to create `owner/foo` repo and there is an existing
redirect from `owner/foo` to a differently name repo, don't consider
that one as an existing repo and proceed with creating `owner/foo`.
2018-08-31 13:00:04 +02:00
Mislav Marohnić
d6a9a445c0
Clean up trailing whitespace
2018-08-29 16:43:03 +02:00
Mislav Marohnić
81c4f07371
Fix `hub create -p` test for private/public repos
2018-08-28 23:57:37 +02:00
Nick Mitchinson
249c47f918
First attempt at adding tests
2018-08-28 13:51:33 -05:00
Mislav Marohnić
4f0f0cf25c
Add test for unrelated `origin` remote existing on `hub create`
...
https://github.com/github/hub/issues/1849
2018-08-27 20:05:18 +02:00
Mislav Marohnić
5e2d072a9a
Handle case of `.github/ISSUE_TEMPLATE` directory
...
Ignore the directory of multiple issue templates for now. In the future,
there might be a way to pick a specific template from the list; this
change is just to prevent crashes.
Fixes #1822
2018-08-23 15:38:34 +02:00
Mislav Marohnić
6466106696
Merge pull request #1843 from github/checks-ghe-compatibility
...
Handle more cases when Checks API is unavailable
2018-08-23 13:00:53 +00:00
Mislav Marohnić
661d2e2a27
`ci-status`: handle more cases when Checks API is unavailable
...
Older Enterprise hosts won't have Checks API, but we still want `hub
ci-status` to work with them. It seems like a HTTP 403 is returned in
that case, so we can safely ignore it. Also ignore HTTP 404 just in case.
Fixes #1821
2018-08-23 14:50:29 +02:00
Mislav Marohnić
8030c3b6ac
Stop requesting `thor-preview` in API requests
...
It wasn't necessary for github.com since December 2017.
2018-08-23 14:39:24 +02:00
Mislav Marohnić
adcfd980d3
Avoid re-requesting reviewers in case of CODEOWNERS
...
Requesting a review via `hub pull-request -r foo` would print a
misleading error message that `foo` couldn't be requested for review in
case `foo` was already requested per CODEOWNERS.
Fixes #1840
2018-08-23 14:39:11 +02:00
Mislav Marohnić
b3ef319bf5
Handle a slightly different HTTP 422 message format
...
This is to avoid a crash in Unmarshal. #1840
2018-08-22 18:19:16 +02:00
Mislav Marohnić
ecaafce407
Have `ci-status` also query Checks API
...
The results of Status and Checks API are merged together.
Fixes #1787
2018-07-07 14:37:41 +02:00
Mislav Marohnić
f1771054ca
Fix tests broken by `--list-cmds` hacks
2018-07-07 13:35:00 +02:00
Mislav Marohnić
2b5bea7d65
Move `--exec-path` scenario to more suitable file
2018-07-07 12:38:04 +02:00
Mislav Marohnić
d7ef572416
Fix integration with git 2.18 shell completions
...
Wrap `git --list-cmds=others` command used by git built-in shell
completions to add a list of hub custom commands.
Fixes #1792
2018-07-07 12:38:02 +02:00
Mislav Marohnić
64e5fe6cbf
Support `remote add -t BRANCH` argument
2018-06-26 17:24:33 +02:00
Mislav Marohnić
a9a497c53c
Fix `hub compare` for Enterprise when `<USER>` is specified
...
Fixes #1758
2018-06-14 15:06:08 +02:00
Mislav Marohnić
6d6d7a60b9
Simplify cherry-picking commits from pull request URLs
...
Instead of a temporary remote being added, now simply fetch
`refs/pull/<PR-NUM>/head` for the origin remote.
Fixes #1773
2018-06-14 14:47:27 +02:00
Mislav Marohnić
aecae7c2b5
Remove Aruba timing hacks
2018-06-08 21:05:14 +02:00
Mislav Marohnić
e2db1307dc
No need for RUBYLIB hacks anymore
2018-06-08 21:05:14 +02:00
Mislav Marohnić
d6f6c2426b
Update Cucumber
2018-06-08 21:05:14 +02:00
Mislav Marohnić
f8bd902145
Support XDG Base Directory Specification
...
Respect XDG_CONFIG_HOME and XDG_CONFIG_DIRS.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables
Fixes #1048 , closes #1061
2018-06-07 19:57:02 +02:00
Mislav Marohnić
02db852769
Remove outdated token-as-password test
...
Full tokens (40 characters) are now allowed as password and tested in a
separate scenario.
2018-06-07 19:22:46 +02:00
Mislav Marohnić
0bf338195c
Increase test coverage for `hub release`
2018-06-07 15:53:38 +02:00
Mislav Marohnić
cc1757cab5
Improve scenario when `<TAG>` was not given to `hub release`
2018-06-07 15:53:13 +02:00
Mislav Marohnić
c3c34ef204
Merge remote-tracking branch 'origin/master' into format-releases
2018-06-07 15:04:03 +02:00
Mislav Marohnić
839a5f38f2
Ignore `XDG_CONFIG_*` environment variables in tests
...
This avoids polluting the user's home environment.
https://github.com/github/hub/pull/1705#issuecomment-392759921
2018-06-07 11:43:28 +02:00
Mislav Marohnić
591ffc3970
Rename test file for `hub pr checkout`
2018-06-07 11:39:05 +02:00
Mislav Marohnić
3e89bfba95
Fix `hub pr list -h <BRANCH>` when owner isn't specified
...
Previously, when `:` wouldn't appear in the value for `head`, the GitHub
API would ignore the `head` parameter altogether. Now, ensure that
`<OWNER>:` syntax is always populated by adding the default from the
current repository.
2018-06-07 11:37:01 +02:00
Mislav Marohnić
b9e86a5d21
Merge pull request #1734 from HaraldNordgren/pull_request_no_edit
...
Create '--no-edit' option for hub pull-request
2018-06-06 16:00:28 +02:00
Mislav Marohnić
a9bb733386
`pull-request --no-edit`: test case for no commits detected
2018-06-06 15:53:43 +02:00
Mislav Marohnić
84c49c5f61
Merge pull request #1764 from github/checkout-pushable
...
PR checkout: ensure resulting branch is automatically pushable
2018-06-06 15:41:42 +02:00
Mislav Marohnić
6cbd427152
Enable `hub delete` on GitHub Enterprise
2018-06-06 14:06:39 +02:00
Mislav Marohnić
527ddce638
Add tests for `hub delete`
2018-06-06 13:36:46 +02:00