Which site best fits your project?
Free for open-source software.
Sign upPlans starting at $50/month.
Sign upWhich site best fits your project?
Free for open-source software.
Sign upPlans starting at $50/month.
Sign up
Automation rules let project maintainers automate actions on new branches and tags pushed to their Git repository: activate a version, hide it, set it as default, delete it on branch deletion, and more. Today we are announcing several new features to automation rules that will make rules more flexible and unlock a long-requested capability: filtering builds based on the contents of a webhook event.
Previously, a rule applied to either a tag or a branch. Now a rule can target any combination of tags, branches, and pull requests at the same time. This avoids duplicating the same rule with different version types just to cover all the cases.
Rules can now look beyond the version name. When a push or pull request webhook is received, a rule can also match against:
fnmatch patterns (e.g. docs/*.rst, .readthedocs.yaml).^docs:).^(docs|build)$).All the configured filters must match for the rule to fire.
Combined with webhook filters, the new Trigger build for version action lets you only build when something relevant changed. A few use cases this enables:
docs/ change).[skip ci].documentation label.When a project has at least one enabled "Trigger build" rule, builds are gated by those rules: if no rule matches the incoming webhook event, the build is skipped.
Each rule now has an Enabled toggle, so you can temporarily turn a rule off without losing its configuration.
Webhook filters rely on the data sent by your Git provider. For now, they are supported on projects connected through our GitHub App integration. Version-only rules (the existing "Activate version", "Hide version", etc.) keep working on every provider as before.
If you already have automation rules configured, there is nothing you need to do. All your existing rules have been migrated to the new model and continue to work the same way. You will simply find new fields available the next time you edit them.
Head over to your project's Settings → Automation rules page to take it for a spin, and check our documentation on automation rules for the full reference and more examples.
As always, let us know what you think or open an issue if you hit any rough edges.