Skip to content

Document reviewStackLabels for conditionally creating review stacks#18693

Open
zacdirect wants to merge 3 commits intomasterfrom
zcook/signal-gating-mvp
Open

Document reviewStackLabels for conditionally creating review stacks#18693
zacdirect wants to merge 3 commits intomasterfrom
zcook/signal-gating-mvp

Conversation

@zacdirect
Copy link
Copy Markdown
Contributor

Documents new functionality for configuring a gating review stack creation by requiring a PR having a specific label on it.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 24, 2026

Docs review

Thanks for documenting this! One bug in the example and a couple of smaller suggestions.

Issues

1. Malformed array literal in the code example (line 336)

The labels are wrapped in a single string, so the example defines one literal label named "review-stack, reviewStack, rs" rather than three labels. Readers who copy this will match no PRs.

        reviewStackLabels: ["review-stack", "reviewStack", "rs"],

2. Incomplete DeploymentSettings snippet (lines 331–338)

Every other TypeScript example in this file (lines 56–76, 116–…, 281–323) shows a full new pulumiservice.DeploymentSettings(...) constructor. This one shows only the github: block, which breaks the pattern and may confuse readers about where reviewStackLabels belongs. Consider expanding it to a complete DeploymentSettings resource for consistency, e.g.:

```typescript
const reviewSettings = new pulumiservice.DeploymentSettings("reviewSettings", {
    organization: pulumi.getOrganization(),
    project: "your project",
    stack: "pr",
    github: {
        pullRequestTemplate: true,
        repository: "pulumi/deployment-automation",
        // only create review stacks for PRs with one of these labels
        reviewStackLabels: ["review-stack", "reviewStack", "rs"],
    },
    sourceContext: {
        git: {
            branch: "refs/heads/main",
            repoDir: "pulumi-pet-shop",
        },
    },
});
\`\`\`

(Replace the escaped backticks with real ones if you take the suggestion — the suggestion fence can't contain a raw closing fence.)

Nits

  • Line 329 packs four ideas into one sentence: default behavior, how to opt in, case-sensitivity, and late-added labels. Consider splitting for scannability, e.g.:

    By default, every pull request against a configured branch creates a review stack. To restrict this to a subset of PRs, set `reviewStackLabels` on the GitHub Deployment Settings to a list of labels. Review stacks are then created only for pull requests carrying at least one matching label. Matching is case-sensitive, and labels added after a pull request is opened also trigger creation.

  • Line 329 ends with "Applies to GitHub only." The heading already says "by GitHub label," and the sentence before it refers to "the GitHub Deployment Settings," so this is redundant. Consider dropping it or moving it closer to the feature description.
  • Consider linking `reviewStackLabels` to the Pulumi Cloud resource provider reference (e.g. the `pulumiservice.DeploymentSettings` registry page) so readers can see the property alongside its siblings.

Scope reviewed

  • `content/docs/deployments/deployments/review-stacks.md` (+13 / -0)

Mention @claude if you'd like another pass after updates.

@pulumi-bot
Copy link
Copy Markdown
Collaborator

pulumi-bot commented Apr 24, 2026

Comment thread content/docs/deployments/deployments/review-stacks.md Outdated
Co-authored-by: Fausto Núñez Alberro <fausto.nunez@mailbox.org>
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.

3 participants