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
0f32f2ac46
refactor(run download): extract zip extraction func into a separate package
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Co-authored-by: Kynan Ware <bagtoad@github.com>
Co-authored-by: Devraj Mehta <devm33@github.com>
2026-01-19 10:38:21 +00:00
Babak K. Shandiz
3ad3fcdce9
fix: resolve gocritic issue
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-11-03 20:05:26 +00:00
Babak K. Shandiz
898992dd39
docs(run list): mention pr checks in help docs
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-30 13:07:58 +00:00
Andrey
89512590ad
Add --force flag to gh run cancel ( #11513 )
...
* feat: add --force flag to run cancel command
Signed-off-by: Andrey <andrekabatareika@gmail.com>
* docs: use less prescriptive docs for --force flag
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
* chore: remove short flag
Signed-off-by: Andrey <andrekabatareika@gmail.com>
---------
Signed-off-by: Andrey <andrekabatareika@gmail.com>
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
2025-08-21 12:45:12 -06: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
Babak K. Shandiz
2ce3279ebc
fix(run): add IsSkipped function
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-16 14:19:45 +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
53cf65e186
refactor(run view): remove Log field from DTO types
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-07-04 14:12:34 +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
Dylan Ancel
1eee56ec00
Add accurate context when run rerun fails ( #10774 )
...
* Add accurate context when run rerun fails
* Update tests to verify behaviour for API errors
Signed-off-by: Babak K. Shandiz <babakks@github.com>
* Use the new `httpmock.JSONErrorResponse` helper
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-06-11 15:28:03 +01:00
Babak K. Shandiz
bb5e10d41f
test(run): add tests for RenderJobs and RenderJobsCompact
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-05-23 11:00:09 +01:00
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
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
Andy Feller
93e51c583b
Update pkg/cmd/run/shared/presentation.go
2025-04-08 16:40:39 -04: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
f7efdde5ef
Add Log to Job data structure
...
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-07 13:54:28 +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
Andy Feller
d2cd14b4cd
Remove out of scope changes, update list commands
...
After discussing this with the team, the `gh config` changes to display `accessible_colors` have been removed from this branch being outside of acceptance criteria. This will be moved to a separate issue along with any other work needed to finalize the public preview such as `gh help` entries for `GH_ACCESSIBLE_COLORS` environment variable.
List commands that use ColorScheme.Gray have been updated to use ColorScheme.Muted.
2025-03-31 11:58:30 -04:00
Kynan Ware
229216e830
doc(run shared): clarify 404 handling
2025-03-26 15:29:20 -06:00
Kynan Ware
c6f574ccb1
test(run list): update rulesets test name
...
Co-authored-by: Andy Feller <andyfeller@github.com>
2025-03-24 14:14:50 -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
a35ae3b8bb
refactor(tests): update test name for org workflows
2025-03-24 12:54:47 -06:00
Kynan Ware
d3ad4f410b
docs(run list): doc runs without workflow names
2025-03-24 12:45:03 -06:00
Kynan Ware
5817f6fce9
fix(run list): do not fail on org workflows
2025-03-24 12:34:50 -06:00
Azeem Sajid
33c30d5bd1
Inconsistent format of examples in help text
2025-02-27 16:26:25 +05:00
Azeem Sajid
8b7fb231ec
Remove trailing whitespace
2025-02-13 11:06:27 +05:00
Azeem Sajid
de7c40789e
Use defer instead
2025-01-29 08:22:32 +05:00