Skip to content

feat: Add stacked pull request endpoints - #4436

Open
Bortlesboat wants to merge 2 commits into
google:masterfrom
Bortlesboat:4435-stacked-pull-requests
Open

feat: Add stacked pull request endpoints#4436
Bortlesboat wants to merge 2 commits into
google:masterfrom
Bortlesboat:4435-stacked-pull-requests

Conversation

@Bortlesboat

@Bortlesboat Bortlesboat commented Aug 6, 2026

Copy link
Copy Markdown

Fixes #4435

Add typed PullRequestsService support for GitHub's five stacked pull request
REST endpoints:

  • list repository stacks, optionally filtered by pull request;
  • create and get a stack;
  • append pull requests to a stack; and
  • unstack the remaining unmerged pull requests.

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 Content unstack responses, and regenerates accessors
and 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.sh
  • script/lint.sh across all 12 modules
  • script/test.sh -covermode atomic ./... across all 12 modules
  • git diff --check

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

@gmlewis gmlewis changed the title github: add stacked pull request endpoints feat: Add stacked pull request endpoints Aug 6, 2026
@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Aug 6, 2026
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.56%. Comparing base (4a79475) to head (295dd70).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4436   +/-   ##
=======================================
  Coverage   97.55%   97.56%           
=======================================
  Files         194      195    +1     
  Lines       19892    19962   +70     
=======================================
+ Hits        19406    19476   +70     
  Misses        268      268           
  Partials      218      218           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @Bortlesboat!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @Not-Dhananjay-Mishra

Comment thread github/pulls.go Outdated
Comment thread github/pulls_stacks_test.go Outdated
Comment thread github/pulls_stacks_test.go Outdated
@Bortlesboat

Bortlesboat commented Aug 7, 2026

Copy link
Copy Markdown
Author

All three review items are addressed in signed commit 295dd70, and their threads are resolved. Local script/test.sh -covermode atomic ./..., script/lint.sh, script/fmt.sh, and script/generate.sh --check all pass. GitHub initially held the new tests, linter, and workflow-security runs at action_required; a maintainer approved them, and the full current upstream matrix is now green.

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

Labels

NeedsReview PR is awaiting a review before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for new stacked pull requests endpoints

3 participants