Commit graph

25 commits

Author SHA1 Message Date
zamasu
d5403fa5f5 Change feedback repo to github.com/cli/cli instead of cli/cli 2020-10-23 09:57:47 +09:00
Sam Coe
74d6eb96be
Address PR comments 2020-09-30 12:55:05 +02:00
Sam Coe
bda27a46ae
Extract version command 2020-09-30 12:49:17 +02:00
Sam Coe
1a1a6303cd
Move disable auth check to bottom 2020-09-30 12:49:17 +02:00
Sam Coe
53a97c3414
Extract rootFlagErrrorFunc into root help 2020-09-30 12:49:17 +02:00
Sam Coe
f00a0f2854
Move completion command out of root package 2020-09-30 12:49:17 +02:00
Sam Coe
c52fc72291
Extract bareHTTPClient function 2020-09-30 12:49:14 +02:00
Mislav Marohnić
d534a94d1b Change how base repository is resolved
On first run in a git repository, `BaseRepo()` will now prompt the user
which repository should be queried as base repository if there are
multiple git remotes or when we are in the context of a fork.

In non-interactive mode, the prompt is skipped and we default to the
first git remote instead.

After the base repo is resolved, the result is cached in the local
repository using `git config` so that RepositoryNetwork API lookups can
be avoided in the future.
2020-09-15 21:27:12 +02:00
Sam Coe
7ecb6a413f
Add tests for help topics 2020-09-14 22:27:17 +02:00
Sam Coe
21449213e5
Expand help topic functionality 2020-09-14 17:50:50 +02:00
Mislav Marohnić
3c32507a13 Consistent use of quotes to delineate commands to be run 2020-09-14 16:26:23 +02:00
Mislav Marohnić
aa72463114 Extract environment as a separate help topic
Co-authored-by: Sam Coe <samcoe@github.com>
2020-09-14 16:25:30 +02:00
Mislav Marohnić
ad0bbde351 Merge remote-tracking branch 'origin' into release-cmd 2020-09-09 15:27:49 +02:00
Mislav Marohnić
feadf684fb Merge remote-tracking branch 'origin' into ghe-auth-tweaks 2020-09-07 17:37:16 +02:00
Mislav Marohnić
995828abf8 Avoid setting a default Accept header in hub api
Due to our HTTP client default behavior, an `Accept` header is added to
all API requests. This is fine for all commands except `gh api`, where
the user should ideally have fine-grained control over most aspects of
HTTP requests and where there should be little to no defaults in general.
2020-09-04 17:42:57 +02:00
Mislav Marohnić
2bb5e052d8 Send GITHUB_TOKEN to github.com and GITHUB_ENTERPRISE_TOKEN to GHES 2020-09-04 17:25:37 +02:00
Mislav Marohnić
9a4a5d86cb Merge remote-tracking branch 'origin' into release-cmd 2020-08-28 17:47:53 +02:00
Sam Coe
41f42d4057 Remove reference to feedback form 2020-08-28 09:06:31 +02:00
Mislav Marohnić
c4f5d6db58 Preliminary gh release commands 2020-08-19 18:25:02 +02:00
vilmibm
621f6a262b minor 2020-08-19 10:11:16 -05:00
vilmibm
850a7ef243 print nice login message when no auth detected 2020-08-18 17:57:52 -05:00
Mislav Marohnić
c095a4bead Allow explicitly specifying the hostname for gh operations
Accept the "HOST/OWNER/REPO" syntax or passing a full URL for both the
`--repo` flag and the GH_REPO environment variable and allow setting
GH_HOST environment variable to override just the hostname for
operations that assume "github.com" by default.

Examples:

    $ gh repo clone example.org/owner/repo
    $ GH_HOST=example.org gh repo clone repo

    $ GH_HOST=example.org gh api user
    $ GH_HOST=example.org gh gist create myfile.txt

    $ gh issue list -R example.org/owner/repo
    $ gh issue list -R https://example.org/owner/repo.git
    $ GH_REPO=example.org/owner/repo gh issue list
2020-08-12 16:16:34 +02:00
Mislav Marohnić
a6e78d74de Merge branch 'pr-commands-isolate-3' into issue-commands-isolate 2020-08-11 15:40:05 +02:00
Mislav Marohnić
172ea2b078 Isolate all alias commands 2020-08-11 13:57:48 +02:00
Mislav Marohnić
aef1a4ba4d Extract root command and factory logic into separate packages 2020-08-07 14:40:33 +02:00