Skip to content
Merged
Changes from all 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
31 changes: 31 additions & 0 deletions docs/automation-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -261,6 +262,36 @@ 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.

!!! 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.

<div class="filter-details" markdown=1>

| Args | Usage | Type | Description |
| --- | --- | --- | --- |
| `draft` | Optional | Bool | When `true`, convert the PR to Draft. When `false`, mark the PR as Ready for review. |

</div>

```yaml+jinja title="example"
automations:
ready_for_review:
# Explicit triggers required to work with draft PRs
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.
Expand Down