Граф коммитов

428 Коммитов

Автор SHA1 Сообщение Дата
Mislav Marohnić dbe8a5d7a0 Fix checking for existing repo in `fork`
When querying `foo/bar` repo redirects elsewhere, assume that `foo/bar`
is available. Fixes #1685
2018-02-22 13:50:38 +01:00
Mislav Marohnić f894442e29 Merge branch 'darrenwee-implement-label-list-color' 2018-01-30 22:19:18 +01:00
Mislav Marohnić 3abe361efa Add missing tests for `hub pr list` 2018-01-30 22:18:25 +01:00
Darren Wee d7906101aa Fix oopsie in test case.
Forgot to change expected result after changing labels functionality.
2018-01-31 00:40:32 +08:00
Darren Wee 15d3ac848e Fix oopsie (added extra newline by accident) 2018-01-30 19:45:04 +08:00
Darren Wee 8edd49eaaf Fix expected test case (pre-colorization) 2018-01-30 19:39:15 +08:00
Darren Wee 672dcc9b05 Merge label.feature into issue.feature. 2018-01-30 18:33:25 +08:00
Darren Wee 7ecc60770b Rename command word from 'label' to 'labels'.
'hub issue labels' makes more semantic sense to retrieve all
available labels from the issue tracker. The command 'label'
sounds like the imperative form, i.e. to label an issue.
2018-01-30 17:01:06 +08:00
Darren Wee 5cd5882c34 Merge branch 'elj/label-list' of https://github.com/eljobe/hub into implement-label-list-color 2018-01-30 16:56:03 +08:00
Mislav Marohnić a2fb6670bb Smarter `per_page` HTTP query when limiting results
If the result limit is N, the default `per_page` will be `N + N/2`
instead of the default 100. This aims to achieve faster API requests for
relatively low values of N.
2018-01-29 23:41:23 +01:00
Mislav Marohnić 31ab5e5147 Fix limiting number of results from `release`, `issue`
- Stops HTTP pagination once the limit has been reached
- Cleans up client implementation by passing around a filter block
2018-01-29 23:30:41 +01:00
Mislav Marohnić 420d2121ed Merge remote-tracking branch 'origin/master' into limit-flags 2018-01-29 22:54:30 +01:00
Mislav Marohnić ba01855cc2 Authenticate with GitHub API without octokit 2018-01-29 20:59:23 +01:00
Mislav Marohnić 04fa2016fc Create a repository without octokit 2018-01-29 20:59:23 +01:00
Mislav Marohnić de6a2bd58d Fetch repository information without octokit 2018-01-29 20:59:22 +01:00
Mislav Marohnić 0ef312ec03 Support use of `-m '' --edit` combination 2018-01-23 17:35:42 +01:00
Mislav Marohnić 2e47a2d732 Fix PR template on a branch with a single commit
The commit body comes first, then template text. This is for
compatibility with GitHub web interface.

Fixes #1657
2018-01-23 16:26:34 +01:00
Mislav Marohnić d4e484b251 Skip fish completion tests if fish is not installed
Fixes #1654
2018-01-22 22:08:46 +01:00
Mislav Marohnić 96a68cf1dc
Merge pull request #1653 from github/detect-pushable-forks
Have `fetch` use writable push URL for writeable fork
2018-01-19 16:58:30 +01:00
Mislav Marohnić 3cce40c626 Have `fetch` use writable push URL for writeable fork
This is to avoid having a writeable fork added with `git://` protocol
(the default when `hub.protocol` is not configured).

This matches the behavior of `hub clone`.
2018-01-19 15:49:46 +01:00
Mislav Marohnić f8663339b0 Enable team reviewers in `pull-request` 2018-01-19 14:47:06 +01:00
Michael Kaiser d2de3094a0 Add limit flag for issue and release commands 2017-10-14 23:50:39 +02:00
Mislav Marohnić cbcc349e39 Merge pull request #1580 from patheticpat/fix-completion-test-support
Fix tmux_pane_content test helper
2017-10-14 18:22:12 +02:00
Michael Kaiser 57ccc3a208 Fix tmux_pane_content test helper
Ignore all lines that are printed before the first command prompt. On
some systems bash prints a message about how to use the sudo command
when started with a clean `HOME`, causing some tests to fail.

Fixes #1477
2017-10-02 22:45:49 +02:00
Michael Kaiser 5c9731c9e4 Fetch all releases when doing `hub release`
As suggested at #1511, instead of fetching only the first 30 releases,
follow the `next` link to fetch all pages.
2017-10-02 18:05:10 +02:00
Pepper Lebeck-Jobe f5cde1e2ee
Make label a sub-command of issue
According to the discussion on #1545 we want to have as few top-level
hub commands as possible to reduce the chances of colliding with
exisitng aliases or commands which may be added to git in the future.

Also, the label listing and modification functionality is not likely
to be used very often, so we shouldn't give the set of commands for
interacting with labels the status of a top-level command.
2017-08-29 23:00:28 +02:00
Pepper Lebeck-Jobe 2ee52688ea
Add the label feature
This explains how the label feature should behave.
2017-08-21 23:32:17 +02:00
Mislav Marohnić 9f08d96a75 Assert exact stdout for different `hub fork` scenarios 2017-08-15 17:16:43 +02:00
Elliott Beach 0f9caf5331 fix whitespace in feature 2017-08-12 15:39:29 -05:00
Elliott Beach 4539860f12 compare repos using sameAs not strcmp 2017-08-12 15:22:28 -05:00
Elliott Beach 26bb43a4ce fix whitespace issues 2017-08-10 19:36:24 -05:00
Elliott Beach f09b0c00db test fork behavior with mixed protocols 2017-08-10 19:23:38 -05:00
Elliott Beach bde4e6e771 Let fork succeed when forked remote exists 2017-08-10 19:11:07 -05:00
Elliott Beach 71d5e5a2b4 add test for remote and fork exist 2017-08-10 19:10:52 -05:00
Elliott Beach 4b2e55736c add test for swallowed stderr 2017-08-05 11:52:28 -05:00
Mislav Marohnić 35ca65b907 Merge pull request #1425 from pocket7878/add-plan9port-rc-support
Add plan9port rc shell support
2017-06-28 11:41:12 +02:00
Mislav Marohnić 9a0c525b42 Merge pull request #1327 from wesbland/delete_release
Add ability to delete releases
2017-06-26 23:44:43 +02:00
Mislav Marohnić c6425bfc38 Fix `git --(exec|html|man|info)-path`
When any of these global flags are passed, don't try to decorate the
output as if `git help` was invoked.

Fixes https://github.com/github/hub/issues/1446
2017-06-26 20:22:11 +02:00
Mislav Marohnić 01c3099abe Fix crash in `WorkdirName` when within bare git repo
`git rev-parse --show-toplevel` returns an empty string with success
status when inside a bare git repo.

This avoids the go crash and also tweaks `hub issue` and `hub
pull-request` to work even if current working directory name couldn't be
obtained because it's only used for looking up issue/PR templates, which
isn't critical functionality.

Fixes https://github.com/github/hub/issues/1331
2017-06-26 20:22:11 +02:00
Josh Betz c5bf224992 Fix test data for newly sorted help text 2017-06-23 11:52:51 -05:00
Mislav Marohnić e3ad4ef7e5 Fix requesting pull request reviewers
The expected HTTP status code is 201

Fixes #1463
2017-05-18 13:19:02 +02:00
Mislav Marohnić 6a48391668 Merge pull request #1475 from eljobe/feature/go1.8
Upgrade to Go 1.8
2017-05-17 13:37:46 +02:00
Mislav Marohnić b13006826a Merge pull request #1472 from eljobe/fix/bash-completion-test
Fix bash completion test on MacOS X
2017-05-11 10:26:16 +02:00
Pepper Lebeck-Jobe 71fa8dad8f
Upgrade to Go 1.8
The only thing that has substansively changed is that Go 1.8 handles
redirect logic more safely than previous versions. This means we can
drop our special handling to avoid following redirects to other
domains. We were only doing that to protect against the possibility
of leaking auth headers. With Go 1.8, the auth headers are not
forwarded when following a redirect to another domain, so we don't
need our special handling any more.

As long as people are attempting to build with the Makefile, the new
check_go_version script should cause the build to stop if our
collaborators aren't using at least version 1.8 of go.
2017-05-11 13:24:04 +09:00
Pepper Lebeck-Jobe 3b04080f94
Remove unneeded assignment
The useless assignment was causing the cucumber test suite to fail
even when the completion scenarios were skipped.
2017-05-09 21:08:26 +09:00
Pepper Lebeck-Jobe 078583db0c
Fix bash completion test on MacOS X
However my git installation was run, it installed the
git-completion.{bash,zsh} scripts under
"${GIT_PREFIX}/contrib/completion/" instead of any of the paths that
this test case was expecting.

To make matters worse, the only way to know that this was the problem
was that each scenaro failed with a message about timing out while
waiting for completion to happen in tmux. Just in case there are
other paths out there where the git-distributed completion scripts
may live, I've also added some detection logic to raise an exception
during the "Given" clause of the scenario if we cannot find the
git-distributed bash completion scripts in any of the places we're
looking for them. This would have made it a lot easier to diagonse
the failures.
2017-05-09 20:50:27 +09:00
Pepper Lebeck-Jobe 2591ca4588
Allow the unsorted expansion for the fish shell
Before this change, the `pu` would sometimes expand to `pull
pull-request push` if the order isn't important, we should take this
fix.

However, if the order is important, we should probably switch the
expectation such that the options are presented alphabetically as
observed.
2017-05-09 20:10:57 +09:00
Mislav Marohnić 9a929485e8 Merge remote-tracking branch 'origin/master' into tomasv-request-reviewers-2 2017-04-24 17:57:37 +02:00
Mislav Marohnić d38f71b5eb Fixes to `Accept` header expectations in tests 2017-04-24 17:53:52 +02:00
Mislav Marohnić 39bd77179d Opt into "black-cat-preview" for all API requests
This allows us to access extra functionality around PR reviews.
2017-04-24 17:45:05 +02:00