Configurable Labels
Use deployment-specific GitHub labels to control Environments, cleanup, and status comments.
Lifecycle uses GitHub labels to control pull-request Environments and comments. The label names can differ between deployments.
The names on this page are defaults. The deployment owner can provide the names that apply to your deployment.
These settings have no supported UI, typed API, or Helm value. A deployment owner must use a supported operator procedure for the installed release. See Runtime configuration surfaces. If no such procedure exists for the installed release, keep the default labels.
Label effects
| Default label | Observable effect |
|---|---|
lifecycle-deploy! | Environment creation and later push redeploys |
lifecycle-disabled! | Prevent or tear down the Environment |
lifecycle-keep! | Prevent cleanup caused by inactivity |
lifecycle-status-comments! | Show status comments when they are off by default |
Deploy or tear down an Environment
If auto-deploy is off, add the deploy label to create an Environment.
To tear down the Environment, do one of these actions:
- Remove the deploy label.
- Add the disabled label.
Closing the pull request also tears down its Environment. Lifecycle removes the deploy label after the pull request closes.
Keep an inactive Environment
Before the inactivity limit, add the keep label. The label prevents only inactivity-based cleanup.
The keep label does not prevent these actions:
- manual teardown
- teardown after pull-request closure
- cleanup of an API-created Environment after its lease expires
Show status comments
Lifecycle can enable status comments by default for a repository. If comments are off by default, add the status-comments label to the pull request.
The deployment owner also controls Lifecycle control comments. A pull-request label does not override that setting.
Check a label problem
If a label has no effect:
- Make sure that you used the configured label name.
- Make sure that the label is on the correct pull request.
- Check whether the Environment is pull-request or API-created.
- Ask the deployment owner to verify the repository label settings.
See Auto-deploy and labels and Environment expiration and cleanup.