William Martin
9a3dc9fce7
Fix log terminal injection
2026-04-23 13:56:33 +02:00
William Martin
24964681a8
Respect --exit-status with --log and --log-failed
...
Fixes #12674
2026-02-13 16:04:06 +01:00
Babak K. Shandiz
f67bd9a7d1
test(run view): assert a skipped job does not cause error
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-16 14:19:57 +01:00
Babak K. Shandiz
64d5d6c6c8
fix(run view): avoid looking for job log if its been skipped
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-16 14:19:56 +01:00
William Martin
7eef7af23d
Reformat gh run view help
2025-07-04 17:25:59 +02:00
Babak K. Shandiz
0d8d330eb1
docs(run view): explain restrictions of fallback API calls
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-04 16:20:08 +01:00
Babak K. Shandiz
25ecbed620
test(run view): delete unused ZIP archive
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-04 14:13:08 +01:00
Babak K. Shandiz
555b8f1bf9
test(run view): update tests
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-04 14:12:07 +01:00
Babak K. Shandiz
6d65904fee
refactor(run view): use API as fallback to fetch job logs
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-04 14:11:09 +01:00
William Martin
408e21ebdd
Merge pull request #10769 from cli/babakks/fix-job-log-resolution
...
Fix job log resolution to skip legacy logs in favour of normal/new ones
2025-04-11 16:16:39 +02:00
Babak K. Shandiz
f337ce90a0
Explain job log resolution reason
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-11 14:51:39 +01:00
William Martin
48274f3118
Document UNKNOWN STEP in run view
2025-04-11 15:23:18 +02:00
Babak K. Shandiz
b65286125b
Add $ anchor to log file regexps
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
This is to make sure we do not pick up the wrong file if there is a
`.txt` sequence in the middle of a job name.
2025-04-11 12:41:31 +01:00
Babak K. Shandiz
2d21b4624c
Test normal job run log is preferred over legacy one
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-11 12:40:26 +01:00
Babak K. Shandiz
940bd10a1d
Prefer normal job run log file over legacy one
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-11 12:39:09 +01:00
William Martin
83bd23b080
Merge pull request #10740 from cli/babakks/fallback-to-job-run-logs
...
Fallback to job run logs when step logs are missing
2025-04-11 11:39:07 +02:00
Babak K. Shandiz
5adf3285ec
Explain when a negative number prefix appears
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-11 10:26:14 +01:00
Babak K. Shandiz
d35236948c
Improve explanation for missing step logs
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-11 10:17:52 +01:00
Babak K. Shandiz
1bf1153c54
Explain the UNKNWON STEP placeholder
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-11 10:08:36 +01:00
Babak K. Shandiz
f673b409f7
Replace UNKNOWN with UNKNOWN STEP in job run log
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-11 09:57:13 +01:00
Babak K. Shandiz
0251a8dd6d
Explain why step logs are preferred
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-11 09:56:17 +01:00
Babak K. Shandiz
021537418e
Verify fallback to job run logs when step logs are missing
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-07 13:54:30 +01:00
Babak K. Shandiz
02e8419124
Verify job run logs attached in attachRunLog test
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-07 13:54:29 +01:00
Babak K. Shandiz
df8c9a317d
Update run_log.zip fixture
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-07 13:54:29 +01:00
Babak K. Shandiz
5e78832a7e
Fallback to print entire job run log if step logs are missing
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-07 13:54:29 +01:00
Babak K. Shandiz
4dee1c3c98
Add jobLogFilenameRegexp function
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-07 13:54:28 +01:00
Babak K. Shandiz
2582948d5f
Extract job name sanitization as a separate function
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-07 13:54:20 +01: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
Uday R
8afb434e59
test(gh run): assert branch names are enclosed in square brackets
2024-12-09 12:45:36 -05:00
Andy Feller
19daa35c81
Merge pull request #9482 from benebsiny/cli-9153
...
fix the trimming of log filenames for `gh run view`
2024-08-22 15:23:06 -04:00
benebsiny
64415df08d
fix the trimming of log filenames for gh run view
2024-08-18 16:57:19 +08:00
Heath Stewart
81f3526740
Fix tests
2024-08-16 10:11:52 -07: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
William Martin
1d38230675
Move config interfaces into gh package ( #9060 )
2024-05-10 10:39:36 +02:00
William Martin
61a698a55a
Add support for jobs with long filenames
...
Co-authored-by: John Basila <john@orca.security>
Co-authored-by: Shay Nehmad <shay.nehmad@orca.security>
2024-05-06 11:32:41 +02:00
William Martin
61584b83cb
Close zip file in run view tests
2024-04-08 16:50:43 +02:00
William Martin
bbeccd69ad
Ensure run log cache creates cache dir if it doesn't exist
2024-04-08 15:51:29 +02:00
William Martin
b6239238c8
Merge pull request #8931 from cli/wm/run-log-cache-stronger-abstraction
...
Create stronger run log cache abstraction
2024-04-05 16:00:28 +02:00
William Martin
c2aee1e402
Ensure cache dir is always available in RunLogCache
2024-04-05 15:39:33 +02:00
William Martin
103586a94c
Remove RunLogCache interface
2024-04-05 15:33:49 +02:00
William Martin
a3ffc1ca33
Use real Run Log Cache in run view tests
2024-04-05 15:18:18 +02:00
William Martin
e644dc50d6
Capture error on Run Log Cache Exists
2024-04-05 15:16:12 +02:00
William Martin
a89d50fc63
Rework Run Log Cache so that cache dir is injected
2024-04-05 14:59:24 +02:00
Rachel Evans
628ade89a7
Anchor the log filename to the start
2024-03-28 13:08:42 +01: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
benebsiny
0b73f2af86
Verify the downloaded zip for gh run view --log
2023-12-14 01:54:16 +08:00
William Martin
8364301017
Simplify run view annotation fetch error handling
2023-11-06 12:40:13 +01: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
137da73642
Simplify mock jobs response
2023-09-03 20:32:41 -04:00