From 265817729832e8d5ee44a9f8a0cf5ade8bd35921 Mon Sep 17 00:00:00 2001 From: Ofer Affias Date: Mon, 19 Jan 2026 10:00:52 +0200 Subject: [PATCH 1/2] docs: Add change-pr-state automation action documentation - Add change-pr-state action to overview list - Document action parameters and usage - Include example for converting draft PRs to ready for review - Supports GitHub and GitLab platforms Relates to LINBEE-21553 --- docs/automation-actions.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/automation-actions.md b/docs/automation-actions.md index 41d91cec5..77965c106 100644 --- a/docs/automation-actions.md +++ b/docs/automation-actions.md @@ -28,6 +28,7 @@ For all other actions, gitStream executes the actions in the order they are list - [`add-reviewers`](#add-reviewers) :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket: - [`add-thread`](#add-thread) :fontawesome-brands-gitlab: - [`approve`](#approve) :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket: +- [`change-pr-state`](#change-pr-state) :fontawesome-brands-github: :fontawesome-brands-gitlab: - [`close`](#close) :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket: - [`code-review`](#code-review) :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket: - [`describe-changes`](#describe-changes) :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket: @@ -261,6 +262,33 @@ automations: - action: approve@v1 ``` +#### `change-pr-state` :fontawesome-brands-github: :fontawesome-brands-gitlab: + +This action, once triggered, updates the PR state between draft and ready for review. + +
+ +| Args | Usage | Type | Description | +| --- | --- | --- | --- | +| `draft` | Optional | Bool | When `true`, convert the PR to Draft. When `false`, mark the PR as Ready for review. | + +
+ +```yaml+jinja title="example" +automations: + ready_for_review: + # because the action is on Draft, explicit triggers must be used + on: + - label_added + - pr_created + if: + - true + run: + - action: change-pr-state@v1 + args: + draft: false +``` + #### `close` :fontawesome-brands-github: :fontawesome-brands-gitlab: :fontawesome-brands-bitbucket: This action, once triggered, closes the PR without merging. From 6f4a58380c5c826847f4a00116d4131f0ef9bc54 Mon Sep 17 00:00:00 2001 From: Ofer Affias Date: Mon, 19 Jan 2026 13:49:38 +0200 Subject: [PATCH 2/2] docs: Add explicit triggers requirement note for change-pr-state - Add informational note explaining gitStream doesn't run on draft PRs by default - Link to execution model documentation for explicit triggers - Update example comment for clarity Since gitStream does not evaluate draft PRs by default, users must configure explicit triggers (using the 'on' parameter) for automations that use the change-pr-state action to function properly. --- docs/automation-actions.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/automation-actions.md b/docs/automation-actions.md index 77965c106..7fff1478a 100644 --- a/docs/automation-actions.md +++ b/docs/automation-actions.md @@ -266,6 +266,9 @@ automations: This action, once triggered, updates the PR state between draft and ready for review. +!!! note "Explicit Triggers Required for Draft PRs" + Since gitStream does not run on draft PRs by default, this action requires the use of [explicit triggers](execution-model.md#explicit-triggers) to function properly. Define triggers using the `on` parameter at the automation level to specify when the automation should evaluate draft PRs. +
| Args | Usage | Type | Description | @@ -277,7 +280,7 @@ This action, once triggered, updates the PR state between draft and ready for re ```yaml+jinja title="example" automations: ready_for_review: - # because the action is on Draft, explicit triggers must be used + # Explicit triggers required to work with draft PRs on: - label_added - pr_created