Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions content/docs/deployments/deployments/review-stacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,3 +323,29 @@ const prMigrationSettings = new pulumiservice.DeploymentSettings("prMigrationSet
});

```

### Gating review stacks by GitHub label

By default, every pull request against a configured branch creates a review stack. To restrict this to a subset of pull requests, 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.
Comment thread
zacdirect marked this conversation as resolved.
Outdated

The following example shows how to configure this pattern using the [Pulumi Cloud Service provider](/registry/packages/pulumiservice):

```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",
},
},
});
```
Loading