Eli Schwartz
9787a3ff2f
build: unexport GOPATH when module vendoring is used
...
The go compiler doesn't like it when you mix the two, and Travis CI does
exactly that. Take advantage of the opportunity to disable it everywhere
else as well.
2019-06-16 23:46:31 -04:00
Eli Schwartz
7d915e232c
build: pass mod vendoring flag on newer versions of go
...
When go autodetects that it is being run as a go mod, and that there is
a vendor directory, it will still try to redownload all sources over the
network, unless you use -mod=vendor to tell it to use that. Additionally,
when using -mod=vendor the compiler will nicely avoid messing with
$GOPATH at all, since it can operate in a completely self-contained
manner.
Take advantage of this, when the detected go version is at least 1.11
(when the -mod flag was introduced).
2019-06-15 22:56:33 -04:00
Mislav Marohnić
8c8c692d44
hub 2.12.0
2019-06-15 16:14:43 +02:00
Mislav Marohnić
01429de9a2
Merge pull request #2169 from github/api-pagination
...
Implement `hub api --paginate`
2019-06-15 16:14:00 +02:00
Mislav Marohnić
b6d9837aa7
[api] Implement GraphQL pagination
...
The GraphQL query has to accept the optional `endCursor` string variable
and output `pageInfo`:
pageInfo {
hasNextPage
endCursor
}
2019-06-15 15:54:07 +02:00
Mislav Marohnić
424acfa86f
[api] Implement REST pagination
2019-06-15 15:16:16 +02:00
Mislav Marohnić
d2658b32ec
[client] Ensure HTTP connection reuse across API calls
...
Repeated calls to `client.simpleApi()` will memoize its result and avoid
making multiple instances of `http.Client` and the associated Transport.
2019-06-15 05:40:21 +02:00
Mislav Marohnić
1102ddafd8
Merge pull request #2062 from Crunch09/issue-1930
...
check head branch exists before creating PR
2019-06-15 04:58:31 +02:00
Mislav Marohnić
583488c713
[pull-request] Abort if the current branch doesn't seem published
...
This is the heuristics we apply to determine if a branch was pushed:
1. The branch has remote tracking information (`branch.<branch>.remote`
and `branch.<branch>.merge` config) that does NOT point to the
base branch for this pull request; or
2. There exists a `refs/remotes/*/<branch>` ref in any git remote.
Otherwise, we consider the branch NOT pushed and we abort before
processing the pull-request command further.
2019-06-15 03:10:16 +02:00
Mislav Marohnić
66fce6e4d3
Merge remote-tracking branch 'origin/master' into issue-1930
2019-06-15 01:31:32 +02:00
Mislav Marohnić
45f7d02a7d
Merge pull request #2141 from ashemesh/master
...
[pr] add ability to open Pull Request in the browser
Closes #1586
2019-06-15 00:41:37 +02:00
Mislav Marohnić
8b49f3c0a7
Merge pull request #2166 from daniel-vera-g/fix-#2155
...
Add a milestone name instead of an id, when creating
2019-06-15 00:31:59 +02:00
Mislav Marohnić
844c913588
Merge pull request #2168 from github/no-maintainer-edits
...
Add `hub pull-request --no-maintainer-edits` flag
2019-06-15 00:31:34 +02:00
Mislav Marohnić
fcdcfffc4a
[pr show] Support upstream configuration with no tracking branch
...
If `hub pr checkout <NUMBER>` was used, the tracking configuration for
the created branch might look like this for forks:
branch.<branch>.remote https://github.com/ <owner>/<repo>.git
branch.<branch>.merge refs/heads/<branch>
Since `RemoteBranchAndProject()` doesn't handle this case, we can't use
it. I want to avoid expanding its functionality right now since it's
being used in several places and I don't want to risk causing
regressions in other commands. Instead, `pr show` now performs its own
upstream branch lookup.
2019-06-15 00:27:43 +02:00
Mislav Marohnić
a7426780ae
[pr show] Add ability to open a pull request based on number
2019-06-14 16:32:58 +02:00
Mislav Marohnić
7a62066524
[pr show] Cover scenario where no matching pull request was found
2019-06-14 16:08:13 +02:00
Mislav Marohnić
0a755b3d98
[pr show] Fix implementation for triangular workflow scenario
2019-06-14 16:05:45 +02:00
Mislav Marohnić
928b40dee5
[pr show] reformat tests
2019-06-14 15:33:50 +02:00
Mislav Marohnić
8047583ad4
[pull-request] Add `--no-maintainer-edits` flag
2019-06-14 15:00:41 +02:00
Mislav Marohnić
e5cc8207cd
[issue] Support passing either milestone name or number
2019-06-14 02:46:29 +02:00
Mislav Marohnić
226d1e80a6
[client] Serialize numeric params to FetchPullRequests, FetchIssues
2019-06-14 02:46:11 +02:00
danielVg
25f56c7de9
Add a milestone name instead of an id
2019-06-12 18:54:00 +02:00
Florian Thomas
ad28ff3146
check head branch exists before creating PR
...
Previously hub checked that there were
[no unpushed commits](b3b3ebb8e5/commands/pull_request.go (L219-L223)
)
but this check doesn't work when there is not even a remote branch.
This fixes #1930 .
2019-06-09 16:46:03 +01:00
Mislav Marohnić
2c83c152fa
[create] Fix newline in error message
...
Fixes #2162
2019-06-06 23:31:03 +02:00
Mislav Marohnić
ef956ba685
Merge pull request #2156 from danielcompton/clarify-pull-request-multi-commits
...
Move commitLogs declaration inside multiple commits block
2019-06-05 12:02:32 +02:00
Mislav Marohnić
eb1814523d
Merge pull request #2158 from sgharms/add-vscode-to-gitignore
...
Ignore VSCode
2019-06-05 11:00:50 +02:00
Steven G. Harms
e71cec9850
Ignore VSCode
2019-06-04 14:05:24 -04:00
Daniel Compton
629437c8c9
Move commitLogs declaration inside multiple commits block
...
This makes it clearer that commits are only added as a commented section
in the case when there are multiple commits on a branch.
2019-06-05 04:54:21 +12:00
Mislav Marohnić
58c4843d9a
Merge pull request #2153 from carlosedp/riscv64
...
Update x/sys module to support Risc-V
2019-06-03 12:59:37 +02:00
CarlosEDP
fb885b37ff
Update x/sys module to support Risc-V
2019-05-31 21:14:48 +00:00
Mislav Marohnić
d76e3e8ebf
pull-request: support detached HEAD if `--head` was passed
...
Fixes #2146
2019-05-29 22:34:41 +02:00
Assaf Shemesh
9495211932
[pr] add ability to open Pull Request in the browser
2019-05-25 21:55:42 +02:00
Mislav Marohnić
a6dc10010d
Merge pull request #2138 from tariq1890/gomod
...
migrate to go modules from dep
2019-05-21 14:10:07 +02:00
Tariq Ibrahim
d55e71a3d3
migrate to go modules from dep
2019-05-14 22:31:19 -07:00
Mislav Marohnić
0be001f76d
Merge pull request #2135 from github/git-trace
...
Enable GIT_TRACE
2019-05-09 16:58:48 +02:00
Mislav Marohnić
b38a3185dd
Drop support for legacy `hub.http-clone` git config value
...
This was kept for backwards compatibility, but was silently broken for
some tiem now. Nobody reported it, so I think it can be safely assumes
that nobody uses this config value anymore.
2019-05-08 20:51:49 +02:00
Mislav Marohnić
039afea3c6
Only process stdout when shelling out to git
...
For stderr, either attach it to parent stderr or silence it completely.
This enables GIT_TRACE.
2019-05-08 20:51:49 +02:00
Mislav Marohnić
16ccde1a74
Merge pull request #2120 from richardballard/Readme-Chocolatey
...
Added Chocolatey as Windows install method in the readme
2019-04-25 13:02:16 +02:00
Richard Ballard
d0eb0573b9
Added Chocolatey as Windows install method in the readme
2019-04-23 16:02:09 +01:00
Mislav Marohnić
dcdf56167c
hub 2.11.2
2019-04-14 15:26:40 +02:00
Mislav Marohnić
54238f1401
Merge pull request #2111 from github/git-global-beforeafter
...
Propagate global git arguments to Before/After chains
2019-04-14 15:25:50 +02:00
Mislav Marohnić
d8973922ac
Propagate global git arguments to Before/After chains
...
This fixes `hub -C mydir merge <URL>` and other commands that might be
invoked with git global arguments by ensuring that those global
arguments are also fowarded to any accompanying `git` commands within
`Before()` and `After()` chains.
2019-04-14 15:08:21 +02:00
Mislav Marohnić
61f6bfdd21
Compatibility with Go < 1.12
2019-04-13 23:17:20 +02:00
Mislav Marohnić
d2114da665
Preserve tilde in man pages
...
Fixes #2107
2019-04-12 18:50:21 +02:00
Mislav Marohnić
accfda9aa4
[remote] Avoid crash in argument parsing
...
Fixes #2102
2019-04-08 12:11:54 +02:00
Mislav Marohnić
94a6cf4558
hub 2.11.1
2019-03-29 12:33:51 +01:00
Mislav Marohnić
d2d203bcad
[pull-request] Fix non-draft pull requests
...
This works around a GitHub API issue where it blocks PRs based on their
draft status even if they were `draft: false`.
Fixes #2099
2019-03-29 12:33:09 +01:00
Mislav Marohnić
e8ab68d869
hub 2.11.0
2019-03-29 02:18:06 +01:00
Mislav Marohnić
d0e9e009ff
Merge pull request #2098 from github/draft-prs
...
Open draft pull requests with `-d` / `--draft`
2019-03-29 02:12:22 +01:00
Mislav Marohnić
b99071f118
[pull-request] Tweak & test opening a PR as a draft
2019-03-29 02:02:40 +01:00