Repository navigation
gh pr checks should show the CI run overall run-id. #3558
Description
Activity
Agreed that this would be helpful; in general the output of
pr checkscan use help.It'd be nice to have:
- elapsed time
- completion time
- run id (since the links are for job ids, generally)
added, combined with column headers (see: #3575 )
Hi @vilmibm , I would like to work on this.
I found that
elapsed timehas already included in the output.Besides, I didn't see
overall run-idfield in the docs (in this case, which is802610070). Do you mind to point out the location of the docs for me (which object does this field belong to)? Thanks.(Edited: I've already found the field)
I agree that it would be useful to provide extra information from
pr checks, but in the interest of backwards compatibility and not changing the current table output too much, I would suggest that extra fields should be exposed by adding--jsonfunctionality to this command and having the user select which fields they are interested in.I have been wanting an option, either on
gh prorgh run downloadto select the latest run for a given pull request number, rather than having to look up that run id manually. This would help looking up the run id, but what I really want is to plug that directly intogh run downloadIt's a bit tricky to do this now with the
ghcli. While we wait for an easier solution to be implemented, I came up with a temporary solution.We can use PR #6990 as an example
$ org=cli $ repo=cli $ ref=$(gh pr view -R cli/cli 6990 --json 'commits' --jq '.commits | last | .oid') $ echo $ref b07410d48554bc39594850dc74e5384c5edca6cf $ gh api \ -H "Accept: application/vnd.github+json" \ /repos/$org/$repo/commits/$ref/check-runs \ --jq '[ .check_runs[] | {name: .name, run_id: .details_url | capture("(?<id>[0-9]+)") | .id } ]' | jq . [ ... { "name": "lint", "run_id": "4118227632" } ]
Then choose a run id and view it
$ gh run -R cli/cli view 4118227632 ✓ remote-add-no-fetch Lint #6990 · 4118227632 Triggered via push about 3 days ago JOBS ✓ lint in 2m26s (ID 11178577059) For more information about the job, try: gh run view --job=11178577059 View this run on GitHub: https://github.com/cli/cli/actions/runs/4118227632
Describe the feature or problem you’d like to solve
gh pr checkscurrently show the different jobs of the CI runs and their run-id. However it doesn't show the overall run-id available in the URL of the Actions tab on the website.Proposed solution
Getting this
run-idwould be useful for multiple reasons, one being the possibility of downloading all artifacts at once usinggh run download <run-id>.Additional context
For example when looking at this CI run, one can see in the URL that the overall run-id is
802610070but this information is not available in the output ofgh pr checks 76377 -R Homebrew/homebrew-core.