You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gh pr checks should show output summary of checks #5634
Describe the feature or problem you’d like to solve
In GitHub UI I see summaries to checks run by Terraform Cloud for a pull request.
The command gh pr checks for the same PR looks like this:
I would like to see the summary Terraform plan: 6 to add, 0 to change, 0 to destroy. when running gh pr checks (maybe also with some --summary option).
Proposed solution
gh pr checks --summary could be a proposal to show the summary for each check. Maybe a new column before the links.
Additional context
Use case for me is to auto-approve pull requests where the summary output of each check is Terraform plan has no changes.
Thanks for the feature request. We like this idea, and we agree that it would be useful to expose this text in the CLI. We're not sure about the name --summary, though, as "job summaries" are something different.
I wonder which API field exposes the text Terraform plan has no changes come from. Might it be the title field?
@jgrumboe Could you check by doing a manual API query on your end and report back:
# 1. replace "123" with your PR number# 2. optionally replace "{owner}" and "{repo}" with your repository information
gh api graphql -F owner='{owner}' -F repo='{repo}' -F pr=123 -f query='query ($owner: String!, $repo: String!, $pr: Int!) { repository(owner: $owner, name: $repo) { pullRequest(number: $pr) { commits(last: 1) { nodes { commit { statusCheckRollup { state contexts(first: 100) { nodes { __typename ... on CheckRun { name checkSuite { workflowRun{workflow{name}} } text title } } } } } } } } }}'
@vilmibm I created #7451 to add my requested feature. It was more than luck today that I read about GH_DEBUG=api and found this, for me, simple solution.
Activity
mislav commentedon May 25, 2022
Thanks for the feature request. We like this idea, and we agree that it would be useful to expose this text in the CLI. We're not sure about the name
--summary, though, as "job summaries" are something different.I wonder which API field exposes the text
Terraform plan has no changescome from. Might it be thetitlefield?@jgrumboe Could you check by doing a manual API query on your end and report back:
jgrumboe commentedon May 25, 2022
Hi @mislav
The output for one example PR is as follows:
Does this help?
mislav commentedon Jun 21, 2022
@jgrumboe Yeah that helps. Thank you!
mislav commentedon Jun 27, 2022
Possibly related report: #3739
jgrumboe commentedon Jul 10, 2022
@mislav is there something I can help with?
sspaeth-r7 commentedon Mar 28, 2023
I too agree this feature would be extremely helpful for a similar use case. Anything we can do to help?
vilmibm commentedon Mar 28, 2023
For tickets marked help wanted, feel free to announce intent to work on a thing and ask specific questions about implementation as needed.
jgrumboe commentedon May 16, 2023
@vilmibm I created #7451 to add my requested feature. It was more than luck today that I read about
GH_DEBUG=apiand found this, for me, simple solution.