Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from Dec 9, 2022

Conversation

mgabeler-lee-6rs
Copy link
Contributor

@mgabeler-lee-6rs mgabeler-lee-6rs commented Dec 8, 2022

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 Dec 8, 2022
@mgabeler-lee-6rs mgabeler-lee-6rs requested review from vilmibm and removed request for a team Dec 8, 2022
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Dec 8, 2022
@cliAutomation
Copy link
Collaborator

cliAutomation commented Dec 8, 2022

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.

@cliAutomation cliAutomation added this to Needs review 🤔 in The GitHub CLI Dec 8, 2022
mislav
mislav approved these changes Dec 8, 2022
Copy link
Member

@mislav mislav left a comment

Thank you! Looks good to me

The GitHub CLI automation moved this from Needs review 🤔 to Needs to be merged 🎉 Dec 8, 2022
@mgabeler-lee-6rs
Copy link
Contributor Author

mgabeler-lee-6rs commented Dec 8, 2022

@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 approved these changes Dec 9, 2022
Copy link
Member

@samcoe samcoe left a comment

@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) Dec 9, 2022
@samcoe samcoe merged commit eadc8e8 into cli:trunk Dec 9, 2022
5 checks passed
The GitHub CLI automation moved this from Needs to be merged 🎉 to Pending Release 🥚 Dec 9, 2022
@mgabeler-lee-6rs mgabeler-lee-6rs deleted the pr-search-isdraft branch Dec 9, 2022
@mgabeler-lee-6rs
Copy link
Contributor Author

mgabeler-lee-6rs commented Dec 9, 2022

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
The GitHub CLI
  
Pending Release 🥚
Development

Successfully merging this pull request may close these issues.

None yet

4 participants