Commit graph

74 commits

Author SHA1 Message Date
Mislav Marohnić
9cbfe73140 Have core commands have consistent Short description 2022-02-18 18:39:30 +01:00
Christian Gregg
c5dbf20ed4
Alias list as ls for all commands (#5214)
I always get tripped up whenever trying to list my codespaces, adding
`ls` as an alias to `list` feels natural enough.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-02-17 13:53:42 +01:00
Mislav Marohnić
5d36bcc4de Merge remote-tracking branch 'origin' into fix/release-discussion-category 2022-02-15 18:28:08 +01:00
Mislav Marohnić
72340076ae tests 2022-02-15 18:27:58 +01:00
Sam Coe
28d2b52769
release create: warn about unpushed local git tag (#5104)
If `gh release create <TAG>` was called and TAG exists locally but not on the remote, this warns about the unpushed tag to avoid recreating it on the remote. The user can pass a value for `--target` to silence the warning.
2022-02-15 16:36:37 +01:00
Mislav Marohnić
4a3ef50d2d
Standardize pager output across commands (#5141)
Add pager functionality to the following commands:
- gist list
- pr checks
- release list
- run list
- run view
- secret list
- workflow list
- workflow view

Additionally, normalize error handling when starting the pager has
failed: only print a non-fatal notice to stderr instead of aborting the
whole command.
2022-02-01 08:36:51 +01:00
Adarsh K Kumar
bb3070aaa0
#4258 Add sub command to delete asset from release (#4416)
* #4258 Add sub command to delete asset from release

* Add just a bit of polish

Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2022-01-21 15:49:36 +02:00
Mislav Marohnić
df21025133 Add tests for release create from commit log, annotated tag 2022-01-17 14:23:05 +01:00
Mislav Marohnić
7090922713 💅 release create tests 2022-01-17 14:05:01 +01:00
Mislav Marohnić
e54b29e9cf Merge remote-tracking branch 'origin' into bugfix/release/create/no-tag-when-generated-available 2022-01-17 13:27:47 +01:00
Mislav Marohnić
44775f87c8 Add nolint directives to allow-list current lint violations 2022-01-14 19:52:52 +01:00
Mislav Marohnić
30c5ef23ee Merge remote-tracking branch 'origin' into ask-stubber 2022-01-14 17:41:08 +01:00
Mislav Marohnić
456d55ead9 Have a single Render function handle all Markdown rendering 2022-01-13 19:39:43 +01:00
Mislav Marohnić
ff072574f9 Port release create tests to the new ask stubber 2022-01-12 23:57:19 +01:00
keijun-kumagai
6bc0b69355 feat(http): supress linter 2022-01-13 00:33:07 +09:00
Spenser Black
e8dfa9e728
Fix tag message option hidden
This fixes the option in `gh release create` to generate release notes
from the tag message being hidden whenever generated notes are
available. This changes the behavior from hiding "generate from tag" and
"generate from commit log" being hidden to *only* the "generate from
commit log" option being hidden.

Fixes #5027
2022-01-12 09:36:29 -05:00
keijun-kumagai
015b9f7fea fix(release): discussion category with assets 2022-01-11 01:49:19 +09:00
Sergio Guzmán Mayorga
43ae0e5f87
Add interactive tag selector to create release (#4525) 2021-12-08 16:20:15 +04:00
Tomohiro Nishimura
a9d397be69
Add --generate-notes flag to gh release create command. (#4467) 2021-12-08 15:20:59 +04:00
Mislav Marohnić
acc1759434 Allow downloading the archive of the latest release 2021-11-30 15:52:51 +01:00
Mislav Marohnić
8e311847db Ensure that we never download "legacy" archive formats
The `zipball_url` and `tarball_url` fields on the Release API payload
always link to "legacy" archives that are of a different format than
those one would get if they downloaded an archive from a Release using
the web interface. The GitHub API does not seem to publish links to
non-legacy archives.

This adds a redirect hack to turn "legacy" Codeload URLs into non-legacy
ones with the goal of ensuring the consistency of user experience when
downloading archives.
2021-11-30 15:52:51 +01:00
lpessoa
8058c4ea34 Adding gh release download for .zip and .tar.gz
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-30 15:52:51 +01:00
Sam Coe
260716a9f8
Repace shurcool/graphql with cli/shurcool-graphql 2021-11-17 12:57:43 -08:00
Mislav Marohnić
83a08aa3ba Remove unnecessary pointers to Go maps 2021-10-25 17:20:12 +02:00
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
Sam Coe
2135918c47
Turn survey options into variables so they can't accidentally become unsynced with default value 2021-10-19 08:55:30 -07:00
Tomohiro Nishimura
c7f79e8447
Set default publish action to draft if --draft option is set 2021-10-19 22:37:46 +09:00
Reto Hablützel
f6e9734f17 add more hints to docs 2021-09-25 08:38:26 +02:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Heath Stewart
e2973453b5
Add helper template functions for rendering tables (#3519)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-08-23 21:00:25 +02:00
Des Preston
bdc5b55f55 pr comments
Only add discussion category to request if there is one. This eliminates
the need to update old tests.

Renaming the variable to something shorter.
2021-08-10 09:47:49 -04:00
Des Preston
45a4257612 add --discussion-category flag to release cmd
Flag for signaling that a discussion should be created with the given
category for the release. Discussions are not supported for draft
releases. If a discussion category is given for a draft, an err will be
shown.

Closes #3381
2021-07-15 10:07:21 -04:00
Mislav Marohnić
c667a0bc49 Fix fetching draft releases from GitHub Actions
When using GITHUB_TOKEN in Actions, the permissions on a repository are
null and therefore we can't check whether the viewer has push access or
not. The solution is to unconditionally check for draft releases instead
of trying to be smart about it. Draft releases are going to be on top,
so we don't have to paginate through all releases in a repository.
2021-05-18 19:44:29 +02:00
Mislav Marohnić
4425365004 Add release view --json support 2021-05-18 19:40:28 +02:00
vilmibm
47ed41bfcd add some more examples for release create 2021-04-22 15:26:26 -05:00
Mislav Marohnić
111e8dbcf2 Pass web browser to each individual command
This removes sensitivity to the BROWSER environment variable in tests
and makes it easier to verify the URL that the browser was invoked with
without having to stub sub-processes.
2021-03-19 21:22:37 +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
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ć
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ć
fee7adf9ba Add issue create -F <file> flag and tests 2021-02-23 14:25:32 +01:00
Mislav Marohnić
9dcf47d5d1 release create: clarify handling of git tags 2021-02-03 22:33:37 +01:00
Mislav Marohnić
f46bab256c Rename to SuccessIconWithColor 2021-01-25 14:56:39 +01:00
Mislav Marohnić
23d68705bc Match color of the success icon with the end state of the record 2021-01-22 23:55:33 +01:00
Mislav Marohnić
5b4a08dcb9 Ensure that only PATH is searched when shelling out to external commands
Works around https://github.com/golang/go/issues/38736 for Windows.
2020-11-11 16:33:13 +01:00
Cristian Dominguez
fa8674386b
Render links as absolute URLs in repo view (#2363)
Co-authored-by: Cristian Dominguez <cristiand391@users.noreply.github.com>
2020-11-11 13:13:19 +01:00
Alisson Santos
cf617e88f4 Extract repeated code to util function 2020-11-03 22:05:04 +01:00
Alisson Santos
7a106e2ded improve error message 2020-11-03 18:46:07 +01:00
Mislav Marohnić
813fbc9b8d Ensure that we don't reuse the same deserialization struct over pagination iterations
This is to avoid subtle deserialization issues in nested slices.
2020-10-14 15:38:21 +02:00
Sam Coe
f0d4fbf84f
Address PR comments around style and naming 2020-09-24 19:27:29 +02:00