Skip to content
Open
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions docs/user/automation-rules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ All enabled automation rules are evaluated for that version,
in the order they are listed.
A rule has three groups of conditions, which are checked in order:

1. The version **type** must be one of the version types selected in the rule (tag, branch, or external).
1. The version **type** must be one of the version types selected in the rule (tag, branch, or pull request).
2. The version **name** must match the version pattern in the rule.
3. If any **webhook filter** is configured, the data from the webhook event
(changed files, commit message, or pull request labels) must also match.
Expand All @@ -49,7 +49,7 @@ Each rule applies to one or more version types:

- **Tag** — Git tags pushed to the repository.
- **Branch** — Git branches pushed to the repository.
- **External** — pull/merge requests opened against the repository.
- **Pull request** — pull/merge requests opened against the repository.

You can select any combination of types in a single rule.

Expand Down Expand Up @@ -259,7 +259,7 @@ Only build when documentation files change
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Match: ``Any version``
- Version types: ``Tag``, ``Branch``, ``External``
- Version types: ``Tag``, ``Branch``, ``Pull request``
- Changed files:

.. code-block:: text
Expand All @@ -277,14 +277,14 @@ Configure a single rule that triggers a build only when the commit message
does *not* contain ``[skip ci]``:

- Match: ``Any version``
- Version types: ``Tag``, ``Branch``, ``External``
- Version types: ``Tag``, ``Branch``, ``Pull request``
- Commit message: ``^(?!.*\[skip ci\]).*``
- Action: ``Trigger build for version``

Only build pull requests labeled with ``documentation``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Match: ``Any version``
- Version type: ``External``
- Version type: ``Pull request``
- Pull request labels: ``^documentation$``
- Action: ``Trigger build for version``
2 changes: 1 addition & 1 deletion readthedocs/builds/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
# Manager name for External Versions or Builds.
# ie: Only pull request/merge request Versions and Builds.
EXTERNAL = "external"
EXTERNAL_TEXT = _("External")
EXTERNAL_TEXT = _("Pull request")

BRANCH = "branch"
BRANCH_TEXT = _("Branch")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by Django 5.2.13 on 2026-06-03 09:38

from django.db import migrations
from django.db import models
from django_safemigrate import Safe


class Migration(migrations.Migration):
safe = Safe.before_deploy()

dependencies = [
("builds", "0072_remove_deprecated_build_fields"),
]

operations = [
migrations.AlterField(
model_name="automationrulematch",
name="version_type",
field=models.CharField(
choices=[
("branch", "Branch"),
("tag", "Tag"),
("external", "Pull request"),
("unknown", "Unknown"),
],
max_length=32,
),
),
migrations.AlterField(
model_name="build",
name="version_type",
field=models.CharField(
blank=True,
choices=[
("branch", "Branch"),
("tag", "Tag"),
("external", "Pull request"),
("unknown", "Unknown"),
],
max_length=32,
null=True,
verbose_name="Version type",
),
),
migrations.AlterField(
model_name="version",
name="type",
field=models.CharField(
choices=[
("branch", "Branch"),
("tag", "Tag"),
("external", "Pull request"),
("unknown", "Unknown"),
],
db_index=True,
default="unknown",
max_length=20,
verbose_name="Type",
),
),
migrations.AlterField(
model_name="versionautomationrule",
name="version_type",
field=models.CharField(
choices=[
("branch", "Branch"),
("tag", "Tag"),
("external", "Pull request"),
("unknown", "Unknown"),
],
help_text="Type of version the rule should be applied to",
max_length=32,
verbose_name="Version type",
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 5.2.13 on 2026-06-03 09:38

from django.db import migrations
from django.db import models
from django_safemigrate import Safe


class Migration(migrations.Migration):
safe = Safe.before_deploy()

dependencies = [
("projects", "0164_show_build_overview_in_comment_default_true"),
]

operations = [
migrations.AlterField(
model_name="automationrulematch",
name="version_type",
field=models.CharField(
choices=[
("branch", "Branch"),
("tag", "Tag"),
("external", "Pull request"),
("unknown", "Unknown"),
],
max_length=32,
),
),
]