Skip to content

Support previews for stacked pull requests - #1807

Open
st0012 wants to merge 3 commits into
ruby:masterfrom
st0012:codex/stacked-pr-previews
Open

Support previews for stacked pull requests#1807
st0012 wants to merge 3 commits into
ruby:masterfrom
st0012:codex/stacked-pr-previews

Conversation

@st0012

@st0012 st0012 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Supports documentation previews for pull requests targeting any branch in ruby/rdoc, including stacked PRs. Previews remain automatic, with no maintainer deployment approval.

Fork workflow events can omit the PR number. The resolver finds each open PR with the same source repository, branch, and head commit. If one head branch targets multiple bases, each PR gets its own preview URL and comment. Each deployment checks that PR's head and base again. Cloudflare secrets remain limited to the deployment step, and the trusted workflow does not check out PR code.

Base retargets start a new preview build. Title and body edits skip the build without cancelling active work or causing missing-artifact errors. A successful build that actually ran must still provide a valid artifact.

The preview uses the exact PR head, not a merge with its base branch. A parent branch update therefore does not rebuild the child preview. Restacking the child starts a new build through the synchronize event.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Documentation preview

View the preview

Commit: 90bd79b

@st0012
st0012 marked this pull request as ready for review September 6, 2026 23:47
Copilot AI balanced review requested due to automatic review settings September 6, 2026 23:47

Copilot AI 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.

🟡 Changes recommended

The PR candidate lookup must include the full branch-wide result to avoid missing deployments and comments.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Extends documentation previews to stacked PRs and non-default base branches.

Changes:

  • Rebuilds previews after base retargeting.
  • Resolves and deploys previews per matching PR.
  • Revalidates PR heads and bases before deployment.
File summaries
File Review
.github/workflows/pr-preview-check.yml Updates triggers and concurrency behavior.
.github/workflows/cloudflare-preview.yml Adds multi-PR deployment, but its fallback-only branch lookup can miss PRs when run.pull_requests is incomplete.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@@ -66,7 +63,6 @@ jobs:
repo: context.repo.repo,
state: 'open',
head: `${headOwner}:${headBranch}`,
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.

2 participants