Include autoMergeRequest info in gh pr commands by mjpieters · Pull Request #7311 · cli/cli · GitHub
Skip to content

Include autoMergeRequest info in gh pr commands#7311

Closed
mjpieters wants to merge 4 commits into
cli:trunkfrom
mjpieters:auto_merge
Closed

Include autoMergeRequest info in gh pr commands#7311
mjpieters wants to merge 4 commits into
cli:trunkfrom
mjpieters:auto_merge

Conversation

@mjpieters

@mjpieters mjpieters commented Apr 12, 2023

Copy link
Copy Markdown
Contributor
  • Add autoMergeStatus as a possible GraphQL query field
  • Add autoMergeStatus to the possible PR json flags
  • Include auto-merge status in gh pr view
  • Filter gh pr list results by auto-merge state

TODO:

  • Include auto-merge status in gh pr status

Fixes #7309

Consolidate the GraphQL page-fetching loops into one method, with each
variant providing a struct to handle the different response types.
Because the API doesn't support filtering by autoMergeRequest status,
the API responses are filtered locally.

@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.

There is a lot of goodies in this PR so far, so thank you for that, but I fear that it's quickly becoming too large for its original intended purpose. I suggest splitting each added feature into separate PRs so that they are easier to comprehend and to review, and that they're less risky to apply.

For instance, adding autoMergeRequest information to PRs JSON fields could be one PR, but extending the output of gh pr status with this information should be another. While doing each change, please mind the size of the diff. Too large a diff can often be a code smell and indicate that maybe a simpler approach could be taken. Thanks!

@mjpieters

Copy link
Copy Markdown
Contributor Author

@mjpieters

Copy link
Copy Markdown
Contributor Author

@mjpieters mjpieters closed this Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include autoMergeRequest information in gh pr (list|view|status) commands

2 participants