feat: Add stacked pull request endpoints - #4436
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4436 +/- ##
=======================================
Coverage 98.53% 98.54%
=======================================
Files 195 196 +1
Lines 17848 17914 +66
=======================================
+ Hits 17587 17653 +66
Misses 261 261 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @Bortlesboat!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
|
All three review items are addressed in signed commit |
|
Thanks, both differences check out against the OpenAPI description. Pushed 5ad53ca.
On the list endpoint: the difference is in Also dropped |
Not-Dhananjay-Mishra
left a comment
There was a problem hiding this comment.
A few struct name suggestions.
|
Took the stutter fixes in 7b58560, but kept the
Reason for not using I went with On the two request types, I'd lean toward leaving them: |
|
Refreshed against current master in 064c6e7. The two request types now use the suggested names, and each endpoint test contains its response and expected-value fixtures directly. Accessors and iterators are regenerated. Formatting, generated-file freshness, all 11 modules' non-race tests, and the custom lint checks pass. The focused stack endpoint tests also pass after replacing the copied pointer helpers with the current Go idiom. Local CGO remains disabled, so race coverage is left to CI. The separate endpoint-resource and embedded pull-request membership types are preserved for the schema distinction discussed above. |
Fixes #4435
Add typed
PullRequestsServicesupport for GitHub's five stacked pull requestREST endpoints:
The change keeps pull-request membership metadata separate from the endpoint
stack resource, adds typed request and list-option types, handles both
updated-stack and
204 No Contentunstack responses, and regenerates accessorsand iterators. Request methods,
paths, query parameters, bodies, response decoding, and failure paths have
focused coverage.
API contract: https://docs.github.com/en/rest/pulls/stacks?apiVersion=2022-11-28
Validation:
script/fmt.shscript/lint.shacross all 11 modulesscript/test.sh -covermode atomic ./...across all 11 modulesgit diff --checkThe local Go configuration has CGO disabled, so a race build was not available;
the full non-race suite passed.
AI assistance: OpenAI Codex helped draft the API bindings, tests, generated-file
workflow, and PR description. I reviewed the rendered diff and validation
evidence, understand every submitted line, and take responsibility for the
contribution and review follow-up.