Commit graph

18 commits

Author SHA1 Message Date
Ville Skyttä
d8b8655f21 Grammar fixes 2026-05-01 10:22:13 +03:00
Tyler McGoffin
a18c54e824 Fix unhandled panic in FindWorkflow and add tests
FindWorkflow had a code path that could error without handling that error
that was introduced in #10328. I previously called out the lack of tests
in this part of the code in my review, and punting them then bit us here:
https://github.com/cli/cli/pull/10328#pullrequestreview-2597266783.

As such, this fixes the panic, but also adds tests to cover the relevant
code paths through FindWorkflow, including some tests for getWorkflowByID,
getWorkflowsByName, and GetWorkflows.

This does NOT seek to refactor the existing code, just cover the existing
behavior and validate that we are resolving this panic (covered by
TestFindWorkflow_nonHTTPError).
2025-02-28 15:11:53 -08:00
Azeem Sajid
c7dd9edd57 [gh workflow run] Improve error handling for --ref flag 2025-01-29 16:39:56 +05:00
w1mvy
9dd5805f9c
Add json export flags to variable list command (#8516) 2024-01-17 10:09:09 -08:00
Raj Hawaldar
330ad32c31
Add JSON output flags to workflow list command (#7902) 2023-08-30 20:19:18 +00:00
Nate Smith
719c9579ba switch to prompter in workflow commands 2023-08-16 15:19:44 -05:00
Sam Coe
8079d18efd
Use asciisanitization package from go-gh (#7745) 2023-07-24 10:50:33 -07:00
Sam Coe
5d82a9553c
Sanitize file contents before displaying them (#7694) 2023-07-18 12:49:25 -07:00
Mislav Marohnić
6a6fd7bace
Recognize .yaml in addition to .yml suffix as workflow file name 2022-09-26 10:54:57 +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
Mislav Marohnić
984cc9f441 Fix tests 2022-09-14 17:05:43 +02:00
vilmibm
41385477c3 fix linting 2022-07-27 14:15:27 -05:00
hirasawayuki
44b9ff5ac5 Add tests to enable a workflow in the disabled_inactivity state 2022-01-16 22:22:08 +09:00
hirasawayuki
97d017e802 Add disabled_inactivity state 2022-01-16 12:40:55 +09:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
vilmibm
8458c5f95d use int64 explicitly in Actions support 2021-04-15 13:32:09 -05:00
vilmibm
48e162fa05 share workflow content getting code 2021-04-08 16:27:57 -05:00
vilmibm
248ee424f2 gh workflow {enable, disable} 2021-03-25 11:35:52 -05:00