Add opt-in PR stack support - #500
Open
GrantBirki wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds opt-in native GitHub pull request stack deployments while preserving existing behavior for ordinary PRs.
Changes:
- Adds
enable_pr_stacks, stack discovery, ancestry validation, and exact-SHA deployment. - Enforces checks and reviews across the selected stack prefix.
- Adds documentation, mocks, contract coverage, unit tests, and bundled runtime updates.
Reviewed changes
Copilot reviewed 25 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
action.yml |
Declares the opt-in stack input. |
README.md |
Documents the new input. |
docs/pr-stacks.md |
Explains stack deployment behavior. |
src/action-io.ts |
Registers the input key. |
src/types.ts |
Adds stack-related input and precheck types. |
src/functions/inputs.ts |
Parses the stack option. |
src/functions/help.ts |
Reports stack configuration in help. |
src/functions/pr-stacks.ts |
Resolves and validates stack snapshots. |
src/functions/pr-stack-checks.ts |
Loads required checks from branch policies. |
src/functions/prechecks.ts |
Applies checks across stack members. |
src/functions/selected-ref-check.ts |
Detects newly added stack membership. |
src/functions/deployment-operation.ts |
Revalidates stacks and deploys exact SHAs. |
tools/acceptance/types.ts |
Extends acceptance mock types. |
tools/acceptance/mock-github.ts |
Mocks stack and policy APIs. |
dist/index.js |
Updates the committed runtime bundle. |
__tests__/types.test.ts |
Updates typed input expectations. |
__tests__/test-helpers.ts |
Adds the default stack input. |
__tests__/schemas/action.schema.yml |
Extends action metadata validation. |
__tests__/main.test.ts |
Tests stack deployment orchestration. |
__tests__/functions/selected-ref-check.test.ts |
Tests membership rechecks. |
__tests__/functions/prechecks.test.ts |
Tests stack-wide policy enforcement. |
__tests__/functions/pr-stacks.test.ts |
Tests stack parsing and validation. |
__tests__/functions/pr-stack-checks.test.ts |
Tests required-check discovery. |
__tests__/functions/help.test.ts |
Tests stack help output. |
__tests__/action-contract.test.ts |
Verifies the public input contract. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
This was tested extensively on the following live pull requests seen below Final tested SHA:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds opt-in native PR stack support with
enable_pr_stacks, which defaults tofalsewhile GitHub stacks are in public preview. It checks the selected PR and its unmerged lower PRs before deploying the exact checked commit. Ordinary PRs keep their existing deployment behavior without calling the preview stack API, even when the flag is enabled.Related to #495.