Commit graph

51 commits

Author SHA1 Message Date
Nate Smith
9fe7326d46
Merge pull request #3338 from cli/merge-job-run-view
absorb job view into run view
2021-04-02 11:00:48 -05:00
Sam Coe
8b1ed28121
Add section in help for actions commands 2021-04-01 21:05:50 -07:00
vilmibm
cc8d55c518 remove job command, update gh actions text 2021-03-31 16:17:30 -05:00
Nate Smith
2ab073d599
Refactor use of glamour to allow style overrides (#3243)
* Refactor use of glamour to allow style overrides

* leave the things the way they were and just expose the ability to set overrides
2021-03-19 16:29:32 +00:00
Nate Smith
8480381d13
workflow list (#3245)
* add gh workflow list

* review feedback
2021-03-16 16:12:27 -05:00
Nate Smith
126b498e9f
Actions Support Phase 1 (#2923)
* Implement first round of support for GitHub Actions

This commit adds:

gh actions
gh run list
gh run view
gh job view

as part of our first round of actions support. These commands are
unlisted and considered in beta.

* review feedback

* tests for exit status on job view

* spinner tracks io itself

* review feedback

* fix PR matching

* enable pager for job log viewing

* add more colorf functions

* add AnnotationSymbol

* hide job, run

* do not add method to api.Client

* remove useless cargo coded copypasta
2021-03-16 13:59:34 -07:00
edualb
e26a1b98a1 add ssh-key command 2021-01-20 20:23:38 +01:00
vilmibm
5309a2089a implement gh secret create and gh secret list 2020-12-04 16:47:23 -08:00
Josh Soref
76bd377253 spelling: error 2020-11-21 21:43:51 -05:00
Nikola Ristić
e87b5bcaff
Add "reference" help topic (#2223)
* Add "reference" help topic

* Only print reference as a help topic

* fix for color fns, slightly generalize

* WIP for switching to markdown

* escape gt/lt

* minor

* higher wrap point

* detect terminal theme

* futz with angle brackets once more

* minor cleanup

* prepend parent commands

* rename help topic fns and add test

* Simplify reference help generation

- the `<...>` characters from command usage line are now preserved by enclosing the entire usage synopsis in a code span
- hard breaks in flag usage lines are preserved by enclosing flag usage in a code block
- TTY detection and Markdown rendering are now delayed until the user explicitly requests `gh help reference`
- `gh help reference` output is now pager-enabled

Co-authored-by: vilmibm <vilmibm@github.com>
Co-authored-by: vilmibm <vilmibm@neongrid.space>
Co-authored-by: Mislav Marohnić <mislav@github.com>
2020-11-18 12:31:36 -06:00
Sam Coe
414de332fb
cleanup 2020-11-12 09:52:14 +03:00
Sam Coe
a79a0bbfd7
Add support for GH_TOKEN and GH_ENTERPRISE_TOKEN 2020-11-12 09:52:10 +03:00
Sam Coe
86906c6769
Small cleanup 2020-11-04 12:40:40 +03:00
Sam Coe
241e90aa9b
Make markdown:generate annotation a markdown generation override for hidden commands 2020-11-04 12:35:58 +03:00
Sam Coe
f770c6481c
Generate markdown for help topics 2020-11-04 12:35:58 +03:00
Sam
c7ede29779
Refactor help topics to include short message 2020-11-04 12:35:58 +03:00
vilmibm
a2aa154794 port entirely to ColorScheme 2020-10-29 12:37:45 -07:00
zamasu
d5403fa5f5 Change feedback repo to github.com/cli/cli instead of cli/cli 2020-10-23 09:57:47 +09:00
Mislav Marohnić
ce8f37aca2 💅 tweak update notifier 2020-10-09 18:15:28 +02:00
ShubhankarKG
78b67fabdd 1. Added GH_NO_UPDATE_NOTIFIER to hhelp_topics
2. Updated test to check if passed variable is not empty
2020-10-08 21:22:26 +05:30
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
Teubel György
b71261219c Add support for GH_PAGER 2020-09-29 17:42:25 +02:00
Mislav Marohnić
b2e36a0979
Merge pull request #1706 from cli/base-resolve
Improve repository base and head resolution
2020-09-16 18:53:21 +02:00
Mislav Marohnić
086d8ed29a Merge remote-tracking branch 'origin' into color-env 2020-09-16 16:51:38 +02:00
Mislav Marohnić
fa2513dea6 Document PAGER environment variable 2020-09-16 16:15:57 +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ć
ca2f2b18ca Add support for CLICOLOR "standard"
The CLICOLOR_FORCE environment variable can now be used to force color
output even when stdout is redirected. https://bixense.com/clicolors/
2020-09-04 21:32:58 +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ć
f7d0988799 Offer different editor modes during release create 2020-08-25 20:20:44 +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ć
d933cd91d4 Migrate completion command 2020-08-07 15:22:49 +02:00