# Triggers and capabilities

> The events, schedules, and filters that start an automation, what it can do, which repositories it runs on, and what to check when one doesn't run.

Triggers set when an automation runs, capabilities set what it may do, and scope sets which repositories it runs on. With triggers on different events, any one can start it.

## Events and schedules

| Category     | Event            | Runs when                                                                |
| ------------ | ---------------- | ------------------------------------------------------------------------ |
| Issue        | New Issue        | An issue is opened.                                                      |
| Issue        | New Comment      | A comment is posted on an issue.                                         |
| Pull Request | New Pull Request | A pull request is opened. Later pushes don’t count.                      |
| Pull Request | New Comment      | A comment is posted on a pull request, including inline review comments. |
| Pull Request | Check Failure    | A check fails on an open pull request.                                   |
| Schedule     | Daily            | Once a day.                                                              |
| Schedule     | Weekly           | Once a week.                                                             |

Schedules run on the default branch of each repository in scope. The form shows the time in your time zone; there’s no custom time or cron.

## Filters

All filters on a trigger must match, and matching ignores case.

| Event            | Filter fields                                                |
| ---------------- | ------------------------------------------------------------ |
| New Issue        | Title, Description, Labels, Opened By                        |
| New Comment      | Comment Body, Comment Author                                 |
| New Pull Request | Title, Description, Labels, Author, Base Branch, Head Branch |
| Check Failure    | Job Name (required), Head Branch                             |

**Labels** checks the labels an issue or pull request has when it’s opened. Adding a label later doesn’t start a run.

## Capabilities

| Group                    | Capabilities                                                                       |
| ------------------------ | ---------------------------------------------------------------------------------- |
| Comment and review       | Post Comment, Post Code Review                                                     |
| Change code              | Push commit, Create PR                                                             |
| Issues and pull requests | Open Issue, Update Issue/PR details, Update Labels, Assign Issue, Assign Reviewers |
| Research                 | Web Search                                                                         |
| Email Paid plans         | Send Email, to the recipients you list                                             |

Every automation can read your code and GitHub data. To change code, select **Push commit** or **Create PR**. **Post Code Review** works only when a pull request starts the run.

## Running commands Startup and higher

On Startup and higher plans, any automation can run commands such as tests, builds, and linters, and can change and push code that way. Ask for code changes only in automations that should make them. On other plans, one with **Push commit** or **Create PR** can still commit and push, but can’t run your tests.

Caution

An automation that changes code can push straight to your default branch. To get pull requests instead, protect the branch on GitHub and ask for a pull request in your instructions.

## Scope

**All repositories** covers every repository devlo can access. **Selected repositories** covers only the ones you pick. On Free, and in an organization that [shares someone’s personal plan](/account/plans/#whose-plan-applies), scheduled runs and test runs cover one repository. To choose which, set **Scope** to **Selected repositories** and pick one.

## If an automation doesn’t run

* It’s off, or the repository isn’t in **Scope**.
* A filter doesn’t match.
* The issue or comment came from a bot.
* The commenter doesn’t have write access to the repository.
* The person who triggered it was removed in **Settings > User Management**.
* The issue or issue comment mentions `@devloai`. That starts a [coding run](/coding/github-issues/) instead.
* Your organization is out of credits. Scheduled runs are skipped without a message.

## Related

* [Create and manage automations](/automations/create/)
* [Example automations](/automations/examples/)
* [Plans and credits](/account/plans/)
