DocumentationConfigurationTrigger Events
Configuration

Trigger Events

When agents run

Trigger Events

Triggers define when your BambooSnow agents run. This guide covers all available trigger types and how to configure them.

Pull Request Events

The most common triggers for code review agents.

Available Events

| Event | Description | |-------|-------------| | opened | New PR is created | | synchronize | New commits pushed to PR | | reopened | Closed PR is reopened | | ready_for_review | Draft PR marked ready | | closed | PR is closed or merged | | labeled | Label added to PR | | unlabeled | Label removed from PR |

Configuration

triggers:
  pull_request:
    types:
      - opened
      - synchronize

    # Only trigger for PRs targeting these branches
    branches:
      include:
        - main
        - develop
        - "release/*"
      exclude:
        - "experimental/*"

    # Only trigger when these paths change
    paths:
      include:
        - "src/**"
        - "lib/**"
      exclude:
        - "**/*.md"
        - "**/*.txt"

    # Filter by PR properties
    filters:
      draft: false  # Don't run on drafts
      author:
        exclude:
          - "dependabot[bot]"
          - "renovate[bot]"

Push Events

Trigger agents when code is pushed to branches.

triggers:
  push:
    branches:
      - main
      - "hotfix/*"
    paths:
      - "src/**"
    # Don't trigger on tag pushes
    tags:
      exclude:
        - "*"

Common Use Cases

  • Security scanning on main: Scan every push to main
  • Deploy preview: Generate preview on feature branch push
  • Release automation: Trigger on release branch push

Schedule Triggers

Run agents on a recurring schedule.

triggers:
  schedule:
    # Cron syntax: minute hour day month weekday
    - cron: "0 9 * * 1"  # 9am every Monday
      timezone: America/New_York

    - cron: "0 0 1 * *"  # Midnight on the 1st of each month
      timezone: UTC

Cron Syntax Reference

┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6, Sunday = 0)
│ │ │ │ │
* * * * *

Examples

| Schedule | Cron | Description | |----------|------|-------------| | Daily at 9am | 0 9 * * * | Every day at 9:00 | | Weekly on Monday | 0 9 * * 1 | Every Monday at 9:00 | | Hourly | 0 * * * * | Every hour | | Monthly | 0 0 1 * * | 1st of each month |

Manual Triggers

Allow manual execution from the dashboard or API.

triggers:
  workflow_dispatch:
    inputs:
      - name: branch
        description: Branch to analyze
        required: true
        default: main
      - name: verbose
        description: Enable verbose logging
        required: false
        type: boolean
        default: false

Run manually:

  • Dashboard: Agents > Run Manually
  • API: POST /api/v1/agents/{id}/run
  • CLI: bamboosnow run agent-name

Repository Dispatch

Trigger from external systems via API.

triggers:
  repository_dispatch:
    types:
      - run-security-scan
      - deploy-complete

Trigger via API:

curl -X POST https://api.bamboosnow.com/v1/dispatch \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"event_type": "run-security-scan", "repository": "owner/repo"}'

Combining Triggers

Agents can have multiple trigger types:

triggers:
  # Run on PRs
  pull_request:
    types: [opened, synchronize]

  # Also run on pushes to main
  push:
    branches: [main]

  # And run weekly
  schedule:
    - cron: "0 9 * * 1"

  # Allow manual runs
  workflow_dispatch: true

Trigger Conditions

Add conditions to filter when agents actually run:

triggers:
  pull_request:
    types: [opened]

  conditions:
    # Only run if PR has certain labels
    - type: label
      match: ["needs-review"]

    # Don't run if PR is from bot
    - type: author
      exclude: ["*[bot]"]

    # Only run if changed files match
    - type: files
      match: ["src/**/*.ts"]
BambooSnow - AI Agent Automation Platform