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

2154 Коммитов

Автор SHA1 Сообщение Дата
Mislav Marohnić 9f83b387ee Merge remote-tracking branch 'origin/master' into revamp-issues 2016-08-14 19:50:28 +02:00
Mislav Marohnić 7633e5b182 Fix GHE host prompts for `hub remote` commands
Now `hub remote` will only prompt to select from your configured hosts
if it can't infer the GitHub hostname from existing remotes.

In case you're prompted, and you choose a GHE host, now that choice will
be properly reflected in the generated URL, unlike before when it would
always revert to "github.com" regardless of choice.

Fixes #1141
2016-08-11 23:34:17 +02:00
Mislav Marohnić af72087bc7 Add support for multiple assignees 2016-08-10 11:44:38 +02:00
Mislav Marohnić 23020acca7 Merge branch 'stable-to-master' 2016-08-10 11:44:27 +02:00
Mislav Marohnić f712cbb8a8 Preserve headers other than "Authorization" in redirects to other hosts 2016-08-10 11:43:32 +02:00
Mislav Marohnić f46eb1f932 Fix setting assignee, milestone, labels on new PR 2016-08-10 11:16:05 +02:00
Mislav Marohnić f5141f48cb fixup preserve headers 2016-08-09 22:08:40 +02:00
Mislav Marohnić 25a4dd061c Resolve owner name in PR `head` specification in case of redirects
When the repo that hosts the `head` for the PR is moved to another
owner, the `owner:branch` specification will be wrong and the GitHub API
will return HTTP 422.

This resolves the latest owner/name pair for head repo so that the value
is never stale when submitting new PR to be created.

Fixes #467
2016-08-09 22:07:33 +02:00
Mislav Marohnić 193d8f8620 Follow 307 redirects in `fork`
Also, adopt the new name of the fork more precisely so it's reflected in
the new remote URL. The name of the new git remote is for now *not*
inherited from the returned Repository object for backwards compatibility.

Fixes #1178
2016-08-09 22:07:33 +02:00
Mislav Marohnić 28c5839d76 Identify repos explicitly in `clone` and `submodule` cukes 2016-08-09 22:07:33 +02:00
Mislav Marohnić 8e212d4892 Dereference repo name when cloning
This ensures that the final repository URL cloned will have the
repository's actual name after redirect.
2016-08-09 22:07:33 +02:00
Mislav Marohnić 4d81d6802b Preserve headers when following GET redirects
Ref. https://github.com/golang/go/issues/4800
2016-08-09 22:07:33 +02:00
Mislav Marohnić 80606a5889 Follow 307 redirects in simpleApi, even for POST
HTTP client used to automatically follow GET redirects, or turn certain
POST redirects to GET when applicable, but for opening a new pull
request for a renamed repo, we need to repeat the POST against the
updated location.
2016-08-09 22:02:04 +02:00
Mislav Marohnić 56fce4bc6b Migrate PR creation to simpleApi 2016-08-09 22:02:04 +02:00
Mislav Marohnić 8c1a62a2a1 Set `charset` declaration with JSON payloads 2016-08-09 22:02:04 +02:00
Mislav Marohnić 501af58913 Set "User-Agent" header for API requests 2016-08-09 22:02:04 +02:00
Mislav Marohnić 713fd93b14 Cache `hub.host` config output to avoid repeated queries 2016-08-07 23:55:56 +02:00
Mislav Marohnić e7f5c55e43 Expand environment variables in GIT_EDITOR value
This matches git behavior. Fixes #835
2016-08-07 23:55:56 +02:00
Mislav Marohnić b4b38abb26 Avoid installing man pages with executable permissions
Fixes #1127
2016-08-07 23:55:56 +02:00
Mislav Marohnić 7c1fedfe90 Upgrade to Go 1.6
The GO15VENDOREXPERIMENT flag is no longer necessary.
2016-08-07 23:55:53 +02:00
Mislav Marohnić 26c4bbd1e9 go fmt 2016-08-07 23:54:38 +02:00
Mislav Marohnić 15d5f4098d Merge pull request #1119 from pcorpet/formatter
Use a formatter to choose the display of issues like `git log --format`.
2016-08-07 09:16:01 -09:00
Mislav Marohnić c25e33e2db Fix case when multiple Enterprise hosts are configured
We only ever read the first hostname from the list because we didn't use
`git config --get-all`.

Fixes #1188
2016-07-12 16:32:25 +02:00
Mislav Marohnić e877e570aa Merge branch 'fish-instructions'
Closes #1149
2016-07-12 15:35:28 +02:00
Mislav Marohnić b34db9cc06 Fix indent for `hub alias` fish instructions 2016-07-12 15:34:28 +02:00
Frederick Henderson a2856756fd Changing the Fish instructions for alias to a function. 2016-07-12 15:34:28 +02:00
Mislav Marohnić 282b71d692 Merge pull request #1204 from huydx/master
Trivial refactoring of checkout command
2016-07-12 15:03:10 +02:00
Mislav Marohnić c534bc7c6a Merge pull request #1207 from voidus/binstubpath
Explicitly specify binstub path in scripts/bootstrap
2016-07-11 11:42:02 +02:00
Simon Kohlmeyer 4e9d29460a Explicitly specify binstub path in scripts/bootstrap
There might be a bundle config that specifies a different path, which
breaks the build. Explicitly specifying the path changes that.
2016-07-07 10:21:00 +02:00
huydx 1cf978ba00 Trivial refactoring of checkout command 2016-07-01 11:30:20 +09:00
Pascal Corpet 9531c266f4 Fix integration test and add one more 2016-05-12 15:58:51 +02:00
Pascal Corpet 2455fa5be4 Account for nil User as well. 2016-05-12 06:57:28 +02:00
Pascal Corpet c142db3f1e Use formatter when listing issues. 2016-05-11 14:39:46 +02:00
Mislav Marohnić 9fc5600205 Merge pull request #1136 from junghans/bash_completion
bashcomp: try to load git comp first (fix #592)
2016-05-09 12:50:33 +02:00
Mislav Marohnić 525ee53e28 Merge branch 'ghe-api-prefix'
Closes #1139, fixes #1100
2016-05-03 17:49:17 +02:00
Mislav Marohnić b346fe0cf8 Teach `simpleApi` how to apply `/api/v3` prefix consistently for GHE
Instead of per-request approach of invoking `client.requestURL()`
manually whenever we're constructing a request path, simply define the
`/api/v3` prefix when configuring the API root URL for `simpleApi` client.
2016-05-03 17:48:30 +02:00
Mislav Marohnić f07b5fbbda Add tests for `ci-status` and `releases` in Enterprise mode 2016-05-03 16:59:19 +02:00
Simon Aquino 02923f31f3 Fix request_url variable to comply with camelCase 2016-05-03 15:29:13 +01:00
Mislav Marohnić 80da4d047d Merge pull request #1165 from github/cmn/head-pasta
Fix copy-pasta
2016-04-21 15:10:08 +02:00
Carlos Martín Nieto 9413795ec7 Fix copy-pasta
The description for --head said it was the head branch instead of head branch.
2016-04-21 12:15:07 +02:00
Simon Aquino 5c0280b313 Fix #1100: Append /api/v3/ to request when using GHE
Git Hub Enterprise requests should always include /api/v3 in the URL
in order to hit the correct API endpoint. The ci-status and release
commands were producing the wrong request URL. As result, an LDAP
authentication page was returned rather than the expected JSON. A
parsing error could be seen: "invalid character '<' looking for beginning
of value".

This commit changes the construction of the request URL for the
ci-status and release commands, making sure the existing client.requestURL
function is called. This makes sure the API request hits always hits the
right endpoint in Git Hub Enterprise.
2016-03-08 10:16:19 +00:00
Christoph Junghans 57f1ff3981 bashcomp: try to load git comp first (fix #592) 2016-03-04 19:18:25 -07:00
Pascal Corpet eafcc3833e Add more colors 2016-02-28 20:28:32 +01:00
Pascal Corpet 87f7e1419e Split huge test in smaller ones. 2016-02-28 20:28:32 +01:00
Pascal Corpet 0746859141 Add padding in the expander. 2016-02-28 20:28:32 +01:00
Pascal Corpet 2a6c091e30 First version of a formatter that works like `git log --format`. 2016-02-28 20:28:32 +01:00
Mislav Marohnić aa4611dd9a Merge branch 'root-dir' 2016-02-28 20:57:00 +09:00
Mislav Marohnić 0d3617fd25 Infer project name from git workdir root name instead of PWD
The `create` and `remote` commands needs to infer the current project
name from the project's directory. Instead of using the current working
directory, which doesn't necessarily match the project's toplevel
directory, use `git rev-parse --show-toplevel` which also respects the
`-C` global flag setting.

Fixes #1105, closes #1114
2016-02-28 20:51:21 +09:00
Mislav Marohnić 77a7b059cf Remove dependecy of `github.Project` to `utils.DirName()` 2016-02-28 19:46:11 +09:00
Pascal Corpet becb9ad00c Add test for root dir name in combination with `-C` flag 2016-02-28 19:25:49 +09:00