Commit graph

114 commits

Author SHA1 Message Date
Kevin Lee
9a1056fc87
Add search commits command (#6817) 2023-01-17 19:35:09 +00:00
Mislav Marohnić
f8f206e063
Group PR, release, and repo subcommands 2022-12-21 14:47:59 +01:00
Mislav Marohnić
a55dd656f3
Merge remote-tracking branch 'origin' into cobra-update 2022-12-20 17:15:25 +01:00
Mislav Marohnić
8cb312a620
Fix release assets upload retry logic
Enables up to 3 retries of uploading a single asset when encountering a network error or a HTTP 5xx error.

Bonus:
- simplifies ConcurrentUpload implementation
- support Go context cancellation
2022-12-14 21:25:09 +01:00
Mislav Marohnić
cbeed671dd
release create: clean up leftover draft release on upload/publish failure 2022-12-14 21:24:39 +01:00
Mislav Marohnić
36ffbe18de
Improve looking up draft releases by tag name
This changes the FetchRelease implementation to look up draft releases directly using by its pending tag name, as opposed to resorting to the Releases list API which is backed by Elastic Search and thus suffers replication lag after the creation of a draft release.

Bonus: all release lookup functions now accept a context for cancellation.
2022-12-14 21:24:08 +01:00
Mislav Marohnić
dd8c5c9dae
Fix clobbering old files in release download (#6694)
Ensures that the old file to be clobbered is first truncated before writing.
2022-12-13 18:39:23 +00:00
vilmibm
6507d35f2f port release command to prompter 2022-12-09 15:06:26 -08:00
Owen Voke
57f5bd8cdd
Add support to exclude pre-releases from release list (#6625) 2022-12-08 08:53:12 +02:00
Luan Vieira
fad72b788d
Avoid duplicate remote tag lookups
Co-authored-by: Mislav Marohnić <hi@mislav.net>
2022-11-16 15:12:18 -05:00
Luan Vieira
f1a067ff18
Clarify --verify-tag flag description
Co-authored-by: Mislav Marohnić <hi@mislav.net>
2022-11-16 15:09:21 -05:00
Luan Vieira
11bef8c3b5
Add --verify-tag flag for release creation command
Fixes https://github.com/cli/cli/issues/6566

When running `gh release create <tag> --verify-tag`, we query <tag>
among repository tags via the GitHub API before creating the release,
and abort the command if the tag was not found.
2022-11-16 13:45:55 -05:00
Mislav Marohnić
b12ea845ef
Migrate to the new Cobra command grouping feature 2022-11-09 16:42:13 +01:00
Mislav Marohnić
6c8aaff919
Merge pull request #6538 from cli/release-make-latest
Support explicitly marking a Release as "Latest"
2022-11-03 11:31:10 +01:00
Luis Filipe Pessoa
a15c254eba
Adding output functionality (#6410)
Output flag allows one to download to a specific file location or event redirect to output using '-' as argument.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-11-02 10:24:33 +01:00
Mislav Marohnić
e8dc825c7c
Avoid duplicate release when creating a release with assets (#6493)
When publishing a release, we rely on server-side validation to abort the operation if an existing published release with the same tag name already exists.

However, then creating a release with assets, we first create a draft release, upload assets to it, then publish. If there was an existing release with the same tag name, the operation would fail but it would leave behind a temporary draft release with assets. This makes the operation fail earlier, before creating any records.
2022-11-01 19:03:03 +00:00
Mislav Marohnić
c63e3a094d
release create: support explicitly marking as "Latest" 2022-10-31 16:30:51 +01:00
Sam Coe
4294ee14a1
revert revert 57fbe4f317 (#6474) 2022-10-20 12:17:20 +00:00
Sam Coe
2cefb9fa59
Fix pr create regression (#6472)
* Revert "Refactor to use new git client (#6447)"

This reverts commit 57fbe4f317.

* Fix pr create regression
2022-10-20 12:46:23 +03:00
Sam Coe
57fbe4f317
Refactor to use new git client (#6447) 2022-10-19 21:11:36 +03:00
Mislav Marohnić
3fe5026d39
Migrate to tableprinter from go-gh (#6346) 2022-10-17 15:15:39 +02:00
Sam Coe
2944f7c3ab
Create git client (#6354) 2022-10-14 07:47:03 +00:00
vilmibm
0660ced676 tweak wording and formatting 2022-10-05 15:59:33 -07:00
lktslionel
0b0ae1e673
feat(cmd/release): allow to delete release with its attached tag 2022-10-06 00:35:06 +02:00
Sam Coe
e7102f9d84
Migrate to go-gh text package (#6236) 2022-09-14 09:23:55 +04:00
Bindu
9fddb07eab
Add --notes-start-tag flag for generating release notes in gh release create (#6107) 2022-09-06 16:06:18 +04:00
Takeshi Sato
e2f344fef4
Add --clobber / --skip-existing to release download (#6053) 2022-09-01 12:28:25 +00:00
Mark Woods
e876b22963
Change markdown wrap limit match terminal width (#6016) 2022-09-01 07:36:25 +00:00
Wheeler Law
8cd9641284
Add newline to body when viewing machine readable release (#6108) 2022-08-31 10:29:38 +04:00
Sam Coe
45f1a71c8b
Remove all direct calls to shurcool-graphql 2022-08-18 21:40:41 +03:00
vilmibm
41385477c3 fix linting 2022-07-27 14:15:27 -05:00
vilmibm
d5334f4115 Revert "update linter checks"
This reverts commit 40ecb8c188.
2022-07-27 13:30:41 -05:00
vilmibm
40ecb8c188 update linter checks 2022-07-26 16:06:52 -05:00
casswedson
00bc550dc6 chore: typo hunting ft. codespell 2022-07-09 21:41:09 -05:00
ffalor
c3a3ce5bee Add exclude-drafts flag to gh release list 2022-05-09 20:47:39 +00:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Roshan Padaki
13342cb272
Don't error on list commands when no results found (#5479)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-25 17:55:52 +00:00
Johannes Plunien
186e5ccfb2
Add release edit command (#5422)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-13 14:51:49 +00:00
Christopher Nethercott
933a91e18e
Add "new" alias to "create" commands (#5388)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-11 16:48:34 +02:00
Gil Raphaelli
a6f6ad74ae
release list: correctly label the Latest release (#4921)
since https://docs.github.com/en/graphql/overview/changelog#schema-changes-for-2021-01-19

Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-03-30 17:08:21 +00:00
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