Commit graph

55 commits

Author SHA1 Message Date
Cameron Booth
c38ca830be Extract shared.GetJob so we can use in rerun too 2022-03-03 11:10:22 -08: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
yasudanaoya
b77c37df0f
feat: add job id, into run view suggest command (#5105)
* feat: add job id, into run view suggest command

* fix: dry

* fix: run id to job id

* Change "a" to "the" when referencing a single job

Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2022-01-27 08:19:37 +00: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ć
44775f87c8 Add nolint directives to allow-list current lint violations 2022-01-14 19:52:52 +01: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
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Param Patidar
20f915d5ba escape metacharacters in job name 2021-06-02 17:20:31 +00:00
Sam
aea6163a83
Merge pull request #3445 from adamslc/log_fix
Fix `run view --log` when steps have slashes
2021-04-20 08:13:26 -07:00
Sam Coe
75227f44d1
linter 2021-04-20 08:05:19 -07:00
Mislav Marohnić
ae99ad4fbe
Merge pull request #3461 from cli/jobs-url-enterprise
Fix requesting REST sub-resources on GHE
2021-04-20 11:31:23 +02:00
Sam Coe
c77c7ec7c9
Match logs based on job name and step number 2021-04-19 12:21:34 -07:00
Luke Adams
58d3aa878d Extract filename creation logic to seperate function 2021-04-19 10:59:36 -06:00
Mislav Marohnić
ac348b0dec Fix requesting REST sub-resources on GHE
GitHub REST resources typically return full URLs to fetch related
resources at. We used to parse those URLs to find just the path portion
and pass that in to the `REST()` function, which only accepted paths. By
doing so, we are essential de-constructing a URL just to re-assemble it
again. While re-assembling it for Enterprise, though, we would
accidentally inject an extra `api/v3/` prefix where one was not needed.

The solution is just to use raw URLs as reported by the REST API with
no modifications. This extends the `REST()` function to accept full URLs
in addition to just paths to resources.
2021-04-19 12:41:09 +02:00
Luke Adams
0822e6b4ed Fix run view --log when steps have slashes 2021-04-16 23:37:24 -06:00
vilmibm
8458c5f95d use int64 explicitly in Actions support 2021-04-15 13:32:09 -05:00
vilmibm
a2f4f725af create cache dir 2021-04-15 11:15:03 -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
efe7aa1f78 fix small bug with startup_failure conclusion 2021-04-13 22:03:59 -05:00
Nate Smith
a579b00dac
Merge pull request #3408 from cli/fix-run-selection
Make run selection unique
2021-04-12 18:44:07 -05:00
Sam Coe
4dd8a44ff1
make run log cache key unique 2021-04-12 16:27:51 -07:00
Sam Coe
1ddebf6396
Fix trying to read from non-existent log file 2021-04-12 16:12:52 -07:00
Sarah Edwards
0b79471024
Use --exit-status instead of -e in example 2021-04-12 15:16:12 -07:00
Sam Coe
33d6017467
linter 2021-04-09 12:16:31 -07:00
Sam Coe
8a4a8dd451
Moar memory 2021-04-09 12:13:01 -07:00
Sam Coe
4a610f13cf
tweak wording 2021-04-09 09:19:15 -07:00
Sam Coe
6b2b792241
linter 2021-04-08 15:57:57 -07:00
Sam Coe
dc63480cf6
Add flag log-failed to display only logs of failed steps 2021-04-08 15:51:08 -07:00
Nate Smith
ed0ef6ad14
Merge branch 'trunk' into display-all-the-logs 2021-04-07 20:12:47 -05:00
Nate Smith
7f02141364
obsolete TODO 2021-04-07 19:55:57 -05:00
Nate Smith
c2375205f4
golf 2021-04-07 19:55:44 -05:00
Mislav Marohnić
026dc4657a Merge remote-tracking branch 'origin' into artifact-download 2021-04-07 20:26:31 +02:00
Mislav Marohnić
a449a1a6f7 Add tests for artifact rendering in run view 2021-04-07 20:26:12 +02:00
Mislav Marohnić
6ce12c07f6 Move Artifact to the "shared" package 2021-04-07 20:26:12 +02:00
Sam Coe
5cb4ece754
Renaming and cleanup 2021-04-07 10:10:11 -07:00
Sam Coe
67e45f1bce
Display all run logs 2021-04-07 09:31:59 -07:00
vilmibm
c8d1d6e8b4 sigh 2021-04-05 15:39:14 -05:00
vilmibm
97b15fea2d xplatform oops 2021-04-05 15:33:31 -05:00
vilmibm
b5fc794b78 support --log for runs 2021-04-05 15:23:21 -05:00
vilmibm
b705b3d6ba make ExitStatus reflect focused job 2021-04-05 14:11:06 -05:00
vilmibm
3f95e4595f tweak error text 2021-04-05 13:35:47 -05:00
vilmibm
1424e4a973 support --web when focusing a job 2021-04-04 21:33:27 -05:00
vilmibm
7fc9295786 support --web for run view 2021-04-04 21:27:20 -05:00
Mislav Marohnić
8552cacf79 Fix test after merge 2021-04-02 21:04:31 +02:00
Mislav Marohnić
9c4afca003 Merge remote-tracking branch 'origin' into artifact-download 2021-04-02 21:00:25 +02:00
Mislav Marohnić
51a0a27a6f Add ARTIFACTS information to run view 2021-04-02 20:52:41 +02:00
vilmibm
0d0ec84775 absorb gh job view into gh run view 2021-03-31 16:17:30 -05:00
vilmibm
0ecb04c687 small refactor around prompting for runs 2021-03-30 15:48:42 -05:00