Cursor Origin triggers

RWX can trigger runs based on Cursor Origin events. Before configuring triggers, ensure you've followed the getting started with Cursor Origin guide. See Event Triggers for options shared across all trigger types.

Push triggers

Placing the following snippet at the top of an RWX file will result in all tasks in the file running on every Cursor Origin push.

on:
  origin:
    push:

For detailed documentation including event fields, see Cursor Origin Push Trigger Reference.

Pull request triggers

Placing the following snippet at the top of an RWX file will result in all tasks in the file running any time a Cursor Origin pull request is created, the head ref is updated, or reopened.

on:
  origin:
    pull-request:

For detailed documentation including event fields and available actions, see Cursor Origin Pull Request Trigger Reference.

Common patterns

It's common to pass values from the event as init parameters into tasks.

on:
  origin:
    push:
      init:
        commit-sha: ${{ event.git.sha }}

base:
  image: ubuntu:24.04
  config: rwx/base 1.1.1

tasks:
  - key: code
    call: git/clone 2.0.8
    with:
      repository: https://origin.cursor.com/YOUR_ORG/YOUR_REPO.git
      ref: ${{ init.commit-sha }}
      github-token: ${{ origin.token }}

Reference pages