Commit graph

73 commits

Author SHA1 Message Date
Andy Feller
93e51c583b
Update pkg/cmd/run/shared/presentation.go 2025-04-08 16:40:39 -04:00
Andy Feller
918cafc222 Deprecate ColorScheme.Gray for ColorScheme.Muted
This commit converts all of the places using ColorScheme.Gray and ColorScheme.Grayf to Muted and Mutedf.

There is a little extra tidying up with local variable names or converting code to use Mutedf format.
2025-04-06 10:18:48 -04:00
Kynan Ware
229216e830 doc(run shared): clarify 404 handling 2025-03-26 15:29:20 -06:00
Kynan Ware
30960d59bc
doc(run list): add enterprise ruleset notes
Co-authored-by: Andy Feller <andyfeller@github.com>
2025-03-24 14:04:16 -06:00
Kynan Ware
5817f6fce9 fix(run list): do not fail on org workflows 2025-03-24 12:34:50 -06:00
petercover
bad7098cfe chore: fix some comments
Signed-off-by: petercover <raowanxiang@outlook.com>
2025-01-23 00:47:27 +08:00
Arseni Dziamidchyk
f9767d0a9a add pending status for workflow runs 2024-12-26 19:10:06 +03:00
Uday R
463105d648 fix: list branches in square brackets in gh run view (#10038) 2024-12-08 12:33:08 -05:00
Andy Feller
86b4bb9956 Include startedAt, completedAt in run steps data
This commit expands the `Step` structure used with GitHub Actions workflow runs to include fields indicating when steps start and complete.

This information is already provided by the GitHub API, so this only involves expanding the structure, fields exported, and the associated tests.

In the future, I could see `gh` including the duration calculation which is used when viewing workflow or workflow run.
2024-10-16 19:38:10 -04:00
Andy Feller
5e7ba54b56
Merge pull request #9162 from joshuajtward/chore/GH-9038
feat: add `-a` flag to `gh run list`
2024-06-13 11:40:08 -04:00
Andy Feller
6190e269a0 Add gh run list tests for workflow selector
This commit adds tests to ensure disabled workflows are outputted as expected when called by name and the appropriate flags.
2024-06-13 11:30:38 -04: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
cawfeecake
105bafd2ec
fix: rename the Attempts field to Attempt; expose in gh run view and gh run ls (#8905)
Co-authored-by: William Martin <williammartin@github.com>
2024-05-22 14:39:13 +02:00
Andy Feller
b442a1b4d2 Fix run exported jobs error for completedAt 2023-12-11 08:42:43 -05:00
nelsonchen304
3bb62d4724
Actions: filter to workflow runs for a specific commit (#8350) 2023-11-29 09:29:26 +00: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
Harvey Sanders
6f0f5a89e2 Use consistent variable naming 2023-09-05 11:36:33 -04:00
Harvey Sanders
d5d10a6f38 Use "Link" header for pagination completion check 2023-09-03 20:32:08 -04:00
Harvey Sanders
a4547481d6 Refactor GetJobs to use RESTWithNext 2023-09-02 01:01:29 -04:00
Harvey Sanders
44e1efc221 Fetch all jobs on a gh view run --json 2023-08-21 10:29:58 -04:00
vilmibm
8a605fbaf5 Merge remote-tracking branch 'upstream/trunk' into run-prompts 2023-05-19 10:25:18 -07:00
cawfeecake
9473ec890c
add --created flag to gh run ls to filter listed runs by when they were created (#7352) 2023-04-25 12:43:19 +02:00
cawfeecake
d7512bb2e7
add --event flag to gh run ls to filter runs by their trigger 2023-04-24 20:50:20 -07:00
nate smith
6fd17ec2d2 delete PromptForRun 2023-04-10 16:43:31 -07:00
nate smith
9010a2e12c use new prompter in run view 2023-04-10 16:21:47 -07:00
Phillipp Bertram
32901084bd lint fixes 2023-03-30 18:12:25 +02:00
Phillipp Bertram
7b3a83157d cleanup 2023-03-30 18:06:02 +02:00
Phillipp Bertram
409e1555e6 feat(run): add new delete command 2023-03-30 17:02:04 +02:00
Alex Petrov
852bc00354
feat: allow filtering workflow runs by statuses 2023-03-29 18:39:59 -04:00
Wing-Kam Wong
0dd8261d2b refactor: use net/url JoinPath 2023-03-28 21:25:42 +08:00
Wing-Kam Wong
48ed914d58 refactor: set the default case first 2023-03-28 21:21:11 +08:00
Wing-Kam Wong
897a2aa53f refactor: don't show latest attempt 2023-03-26 16:20:57 +08:00
Wing-Kam Wong
3796b6d6e8 feat: append attempt number in returned run url 2023-03-26 16:10:42 +08:00
Wing-Kam Wong
baaa5c3184 feat: add attemptLabel to RenderRunHeader 2023-03-26 14:38:24 +08:00
Wing-Kam Wong
9a0f7916c3 feat: update GetRun path based on attempt 2023-03-26 14:11:42 +08:00
Sam Coe
1786ece4a4
Change uint8 to uint64 to hold job with more than 255 run attempts (#6935) 2023-01-31 08:55:41 +11: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
Mislav Marohnić
aec2c5f330
run: add number json field to access run number 2022-10-24 15:40:07 +02: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
vilmibm
41385477c3 fix linting 2022-07-27 14:15:27 -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
Taylor Faubion
11b1059237
fix gh run download <run-id> not getting > 100 artifacts (#5799)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-07-12 11:01:38 +00:00
Cameron Booth
c38ca830be Extract shared.GetJob so we can use in rerun too 2022-03-03 11:10:22 -08: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
Cristian Dominguez
ddaef8baa4
Add --json export flag for workflow runs (#3869)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-17 15:55:45 +00:00
Benjamin Chadwick
3ea69c8c9b
pr checks: count "cancelled" jobs as failing instead of neutral (#4850) 2021-12-16 12:01:53 +01: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
bchadwic
1f2ab7fbe4 pr and run check symbols revision 2021-08-05 02:13:55 -07:00
Yuki Osaki
e804053777 change unit 32 to unit 64 2021-06-25 14:32:45 +09:00