Commit graph

828 commits

Author SHA1 Message Date
Mislav Marohnić
01bbb15b57 Add pr list --search 2021-03-24 16:46:45 +01:00
Mislav Marohnić
75cfed4bef Import PR list API implementation to pr/list package
Also splits List vs. Search queries into separate methods for better
maintanability.
2021-03-24 16:46:42 +01:00
Mislav Marohnić
179d3f0249 Add a unified GitHub Search query builder 2021-03-23 18:52:58 +01:00
Gowtham Munukutla
70d4873914 add generic search naming for issues and PRs @samcoe 2021-03-23 18:10:46 +01:00
Mislav Marohnić
80035aa686 💅 cleanup switching to search mode in issue list 2021-03-23 18:08:14 +01:00
Gowtham Munukutla
f791bbdbcb add search feature in listing issues 2021-03-23 18:08:14 +01: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
Mislav Marohnić
40da8f9c69 Allow retrying HTTP/2 uploads for release assets
The `Request.GetBody` func allows the retry mechanism to reopen the file
that's being uploaded as the request body in case the body of the
previous request has already started to be read.

Hopefully fixes the error:

    http2: Transport: cannot retry err [stream error: stream ID 1; REFUSED_STREAM]
    after Request.Body was written; define Request.GetBody to avoid this error

Ref. d523dce5a7/http2/transport.go (L554)
2021-03-17 15:55:22 +01: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
Mislav Marohnić
d5fb817dfc Remove unnecessary BodyFile field 2021-03-15 15:12:41 +01:00
Cristian Dominguez
8bfe64d593 Accept --body-file flag if --body is supported 2021-03-15 15:12:41 +01:00
Nate Smith
eddd8f00d1
Merge pull request #3086 from g14a/feature/diffstat-pr
Feature/diffstat pr
2021-03-08 16:03:39 -06:00
Mislav Marohnić
b8937e46df
Merge pull request #3183 from kidonng/patch-1
Fix a typo in gh api's help text
2021-03-08 15:28:47 +01:00
Kid
3a8313b4f7
Fix a typo in gh api 2021-03-08 22:14:29 +08:00
Emmanuel Duchastenier
bcef9f83a8
fix typo in docs of alias command
correct syntax is `--assignee` instead of `--assigned`
2021-03-08 15:11:31 +01:00
Gowtham Munukutla
1d8dd2f1e9 add tests for additions and deletions 2021-03-06 15:02:16 +05:30
Gowtham Munukutla
f2489ed22f reduce arg length to fprintf 2021-03-05 14:05:41 +05:30
Gowtham Munukutla
bdd663e658 Add additions and deletions in pr view raw as well 2021-03-05 13:41:25 +05:30
Gowtham Munukutla
9944698665 Add additions and deletions in pr view 2021-03-05 11:20:49 +05:30
Nate Smith
2fbc037658
Merge pull request #3042 from g14a/bug/gist-binary-files
Remove functionality to add, view and edit binary files in gists
2021-03-04 13:01:54 -06:00
Mislav Marohnić
4e24f36495 Declare --jq, --template, --silent options mutually exclusive 2021-03-04 17:29:59 +01:00
Mislav Marohnić
d89756c94c Add test for api --jq 2021-03-04 17:10:48 +01:00
Mislav Marohnić
06eeea0737 Change the api --filter flag to api --jq 2021-03-04 17:05:31 +01:00
Mislav Marohnić
4c26d617d3 Merge remote-tracking branch 'origin/api-template' into api-jq 2021-03-04 17:00:41 +01:00
Mislav Marohnić
eb08774370 Assert that executeTemplate is invoked 2021-03-04 16:48:06 +01:00
Mislav Marohnić
f53ad7161a Add more api --template tests 2021-03-04 16:35:08 +01:00
Mislav Marohnić
0f27084f57 Add flag parsing test for api --template 2021-03-04 15:01:59 +01:00
Mislav Marohnić
07cb5e9e17 Merge remote-tracking branch 'origin' into api-template 2021-03-04 14:53:08 +01:00
Mislav Marohnić
aa5cf6c48a
Merge pull request #3075 from cli/credential-helper-absolute
Use absolute path when configuring gh as git credential
2021-03-04 13:51:24 +01:00
Mislav Marohnić
e96d974331
Merge pull request #3023 from cli/cancel-error-status
Issue/pr create: exit with nonzero status code when "Cancel" was chosen
2021-03-04 13:45:11 +01:00
Mislav Marohnić
440b59f8c3 Add the api --preview flag to opt into GitHub API previews
This was previously available manually via the `-H` flag, but it was
verbose, especially when opting into multiple previews.
2021-03-03 20:12:51 +01:00
Mislav Marohnić
03baeb2645 Add documentation and tests for api --filter 2021-03-03 19:24:38 +01:00
Mislav Marohnić
9f4eb55b66 Merge remote-tracking branch 'origin/api-template' into api-jq 2021-03-03 17:35:18 +01:00
Mislav Marohnić
98f1f5ec0d Use absolute path when configuring gh as git credential
This keeps git operations working even when PATH is modified, e.g. `brew
update` will work even though Homebrew runs the command explicitly
without `/usr/local/bin` in PATH.

Additionally, this inserts a blank value for `credential.*.helper` to
instruct git to ignore previously configured credential helpers, i.e.
those that might have been set up in system configuration files. We do
this because otherwise, git will store the credential obtained from gh
in every other credential helper in the chain, which we want to avoid.

Before:

    git config --global credential.https://github.com.helper '!gh auth git-credential'

After:

    git config --global credential.https://github.com.helper ''
    git config --global --add credential.https://github.com.helper '!/path/to/gh auth git-credential'
2021-03-03 16:20:21 +01:00
Mislav Marohnić
bf97c6e273 Add template functions, documentation, tests 2021-03-02 20:07:04 +01:00
Mislav Marohnić
ed219ab5f3 Merge remote-tracking branch 'origin' into api-template 2021-03-02 18:31:28 +01:00
Mislav Marohnić
3444d00bee
Merge pull request #3018 from castaneai/pr-create-body-file
Add `pr create --body-file` flag
2021-03-02 15:21:17 +01:00
Mislav Marohnić
07e6d60c80
Merge pull request #2991 from cli/repo-create-prompt-change
Repo create tweaks
2021-03-02 15:14:16 +01:00
Mislav Marohnić
e16c3124dd Disallow binary files with gist edit -a 2021-03-02 14:58:16 +01:00
Mislav Marohnić
066ba54549 Sort gist files case-insensitively 2021-03-02 14:53:19 +01:00
Mislav Marohnić
77d9051d0e Simplify looking up binary types in gist 2021-03-02 14:53:10 +01:00
Gowtham Munukutla
973fbb0925 Disallow operating on binary files in gist 2021-03-02 14:52:44 +01:00
Mislav Marohnić
dd34cae112 Merge remote-tracking branch 'origin' into cancel-error-status 2021-03-02 13:52:07 +01:00
Mislav Marohnić
2ebdde1ddd Exit with status code "2" on user cancellation errors
This also stops printing "interrupt" after Ctrl-C is pressed.
2021-03-02 13:48:44 +01:00
Mislav Marohnić
50c49df41a
Merge pull request #3010 from cli/api-cache
Add `api --cache` flag
2021-03-02 12:47:03 +01:00
vilmibm
39718cd5ca just hide empty descriptions 2021-03-01 16:07:04 -06:00
vilmibm
00e8c07021 Merge remote-tracking branch 'origin/trunk' into interactive-gist-view 2021-03-01 16:05:26 -06:00
vilmibm
e100b15acb some text tweaks 2021-03-01 16:03:48 -06:00
Mislav Marohnić
69b9aa3a57 Merge remote-tracking branch 'origin' into api-cache 2021-03-01 16:06:17 +01:00