Commit graph

36 commits

Author SHA1 Message Date
Azeem Sajid
1e6a2b1aff
Add --compact flag to run watch (#10629)
* [gh run watch] Support `--compact` flag

* [gh run watch] Support `--compact` flag

* Add changes for updated AC

* Incorporate review changes

* docs(run watch): fill up the line to 80 chars

Signed-off-by: Babak K. Shandiz <babakks@github.com>

---------

Signed-off-by: Babak K. Shandiz <babakks@github.com>
Co-authored-by: Babak K. Shandiz <babakks@github.com>
2025-05-23 10:55:41 +01:00
Babak K. Shandiz
284880c21e
Fix StatusJSONResponse usage (#10810)
* Fix `StatusJSONResponse` usage

Signed-off-by: Babak K. Shandiz <babakks@github.com>

* Replace `assert` with `require`

Signed-off-by: Babak K. Shandiz <babakks@github.com>

* Improve assertion against errors

Signed-off-by: Babak K. Shandiz <babakks@github.com>

* Add `JSONErrorResponse` helper func

Signed-off-by: Babak K. Shandiz <babakks@github.com>

* Use `httpmock.JSONErrorResponse`

Signed-off-by: Babak K. Shandiz <babakks@github.com>

* Replace `StatusJSONResponse` to `JSONErrorResponse` for better readibility

Signed-off-by: Babak K. Shandiz <babakks@github.com>

* Fix improper use of `StatsJSONResponse`

Signed-off-by: Babak K. Shandiz <babakks@github.com>

---------

Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-05-01 20:22:43 +01:00
Azeem Sajid
33c30d5bd1 Inconsistent format of examples in help text 2025-02-27 16:26:25 +05:00
Uday R
8afb434e59 test(gh run): assert branch names are enclosed in square brackets 2024-12-09 12:45:36 -05:00
Wing
f647131e1d
Gracefully degrade when fetching annotations fails due to 403 (#9113)
Co-authored-by: William Martin <williammartin@github.com>
2024-06-13 14:33:06 +02:00
Jason O'Donnell
1f07de7557 Fix doc bug for gh run watch 2024-05-06 12:04:52 -04:00
William Martin
90fc403813 Document run watch and view not supporting fine grained PATs 2024-03-19 14:52:43 +01:00
Andy Feller
3bb5f54073 Apply first round of owner/repo#number consistency
This commit expands on @nobe4 initial work by bringing the owner and repository name to the most obvious issue and PR number output use cases before making a second pass for any edge cases.
2024-03-01 14:03:18 -05:00
Arun Sathiya
9d04ee6c8d
update(run): Use attempt input when fetching jobs (#7831)
* Introduce attempt flag for run watch and use attempt input when fetching jobs

* Handle attempt input for 'run watch' commands instead of using the latest attempt

* Revert attempt flag implementation for 'run watch' command because it is intended only for the latest attempt

* Fix tests for cases when attempt flag is used on 'run view' command

---------

Co-authored-by: Andy Feller <andyfeller@github.com>
2023-10-03 14:36:47 +02:00
Heath Stewart
073ec3426b
Return HTTP errors properly for some commands (#8037)
* Return HTTP error for `run watch`

Partially fixes #8026

* Return HTTP error for `gpg-key delete`

Partially fixes #8026
2023-09-24 18:22:55 +02:00
nate smith
76fdfaa895 use new prompter in run watch 2023-04-10 16:42:35 -07:00
Wing-Kam Wong
6c66342742 feat: pass latest attempt to RenderRunHeader for watch 2023-03-26 14:38:53 +08:00
Wing-Kam Wong
bd0f535dea feat: pass 0 to fetch latest attempt 2023-03-26 14:11:19 +08:00
Natthakit Susanthitanon
8617eb7df9
Add jobs field for run view --json (#6507)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-11-03 12:59:35 +00:00
Isaac Shalom
f1be4dc51c
Fix looking up workflow name for workflow runs (#6266)
The API field `WorkflowRun.name` is not guaranteed to correspond to the workflow name anymore. This introduces additional API lookups that resolve Workflows by their ID and look up their name in a future-proof fashion.

It also adds two new JSON fields for export: `displayTitle` and `workflowName`.

Co-authored-by: Christina Guo <61271066+guo-chris@users.noreply.github.com>
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-09-21 20:41:19 +02:00
Sam Coe
e7102f9d84
Migrate to go-gh text package (#6236) 2022-09-14 09:23:55 +04: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
Mislav Marohnić
02881b4783
Correctly determine run started/elapsed timestamps (#5945)
This switches `run list` and `run view` commands to measure how long ago did the run happen by using `run_started_at`, which is the timestamp of the latest run in a series, instead of `created_at`, which is the timestamp of the first run. This change also fixes accurate duration for in-progress runs.
2022-07-21 17:30:46 +02:00
Heath Stewart
be4b392530 Use alternate screen buffer for watching runs
Resolves #5679
2022-05-23 22:18:11 -07:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Anton Baklanov
e28fa3c112
Add branch and actor filters to run list (#4100)
* Add branch and actor filters to `run list`

* Simplify what FilterOptions can do

* Check not only limit in TestNewCmdList

* Verify that branch/actor params are parsed properly

* Verify that API requests have proper query parameters

* Change flag name from actor to user

Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2022-01-26 08:14:56 +02:00
Mislav Marohnić
e43cb2b880 Port more legacy stubs to the new ask stubber 2022-01-14 19:34:15 +01:00
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
Nate Smith
425bc64859
Merge pull request #4090 from bchadwic/pr-checks
Revised pending and skipped symbols for pr checks / run commands
2021-09-27 09:25:21 -07:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Heath Stewart
88af63d36f
Re-enable label colors for issue list (#4106)
* Re-enable label colors for issue list
* Drop parentheses wrapping issue labels
* Support ANSI escape codes in TablePrinter cells
* Switch to a Truncate implementation that correctly measures ANSI escape codes
* Only output RGB color if terminal has truecolor capabilities
* Enable `ENABLE_VIRTUAL_TERMINAL_PROCESSING` on Windows - fixes wrapping issues with full lines and allows truecolor rendering

Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-08-23 19:55:12 +02:00
bchadwic
1f2ab7fbe4 pr and run check symbols revision 2021-08-05 02:13:55 -07:00
Mislav Marohnić
13037226c2 Add test for gh run watch --exit-status with completed runs 2021-07-12 16:58:45 +02:00
Des Preston
1980cc83b9 return SilentError if completed run failed
If `gh run watch ${ID} --exit-status` is run and "ID" is the ID of a
completed job that failed, return a SilentError. This ensures that the
program returns a non-zero code.

Fixes #3962
2021-07-09 11:54:58 -04:00
vilmibm
8458c5f95d use int64 explicitly in Actions support 2021-04-15 13:32:09 -05:00
vilmibm
e10a3f164f minor usage improvements 2021-04-13 22:43:02 -05:00
vilmibm
04844256dd annotation fixes 2021-04-13 22:10:32 -05:00
vilmibm
65524f1ea8 review feedback 2021-04-07 12:19:47 -05:00
vilmibm
c8e481e165 gh run watch 2021-04-06 20:27:09 -05:00