Skip to content

Add isDraft to search prs json options, matching pr view - #6704

Merged
samcoe merged 2 commits into
cli:trunkfrom
mgabeler-lee-6rs:pr-search-isdraft
Dec 9, 2022
Merged

samcoe merged 2 commits into
cli:trunkfrom
mgabeler-lee-6rs:pr-search-isdraft

Conversation

@mgabeler-lee-6rs

Copy link
Copy Markdown
Contributor

The gh pr view --json ... allows returning the isDraft field, but gh search prs does not. This adds that option to the search command to match the view command.

@mgabeler-lee-6rs
mgabeler-lee-6rs requested a review from a team as a code owner December 8, 2022 17:03
@mgabeler-lee-6rs
mgabeler-lee-6rs requested review from vilmibm and removed request for a team December 8, 2022 17:03
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Dec 8, 2022
@cliAutomation

Copy link
Copy Markdown
Contributor

Hi! Thanks for the pull request. Please ensure that this change is linked to an issue by mentioning an issue number in the description of the pull request. If this pull request would close the issue, please put the word 'Fixes' before the issue number somewhere in the pull request body. If this is a tiny change like fixing a typo, feel free to ignore this message.

@mislav mislav left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks good to me

@mgabeler-lee-6rs

Copy link
Copy Markdown
Contributor Author

@mislav I realized there's a bunch of other fields that could be added to search prs too, would you prefer I amend this PR, or open a second one after this merges?

@samcoe samcoe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgabeler-lee-6rs Thanks for the contribution, the code looks good to me. I pushed a small commit to address some style nits that I had. I am going to merge this one and we can address adding other fields in a follow up PR.

@samcoe
samcoe enabled auto-merge (squash) December 9, 2022 07:49
@samcoe
samcoe merged commit eadc8e8 into cli:trunk Dec 9, 2022
@mgabeler-lee-6rs
mgabeler-lee-6rs deleted the pr-search-isdraft branch December 9, 2022 13:23
@mgabeler-lee-6rs

Copy link
Copy Markdown
Contributor Author

I did a closer look and the "other fields" I was hoping to add aren't present in the REST API, only the GraphQL API. That seems like a rather chunky change to make, and more difficult to test for backwards compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants