Skip to content
Merged
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
56 changes: 56 additions & 0 deletions docs/src/content/docs/reference/frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ The `on:` section uses standard GitHub Actions syntax to define workflow trigger
- `stop-after:` - Automatically disable triggers after a deadline
- `manual-approval:` - Require manual approval using environment protection rules
- `forks:` - Configure fork filtering for pull_request triggers
- `skip-roles:` - Skip workflow execution for specific repository roles
- `skip-bots:` - Skip workflow execution for specific GitHub actors

See [Trigger Events](/gh-aw/reference/triggers/) for complete documentation.

Expand Down Expand Up @@ -262,6 +264,60 @@ bots:
- `github-actions[bot]` - GitHub Actions bot
- `agentic-workflows-dev[bot]` - Development bot for testing workflows

### Skip Roles (`on.skip-roles`)

Skip workflow execution for users with specific repository permission levels. Useful for exempting team members from automated checks that should only apply to external contributors.

```yaml wrap
on:
issues:
types: [opened]
skip-roles: [admin, maintainer, write]
```

**Available roles**: `admin`, `maintainer`, `write`, `read`

**Behavior**:
- Workflow is cancelled during pre-activation when triggered by users with listed roles
- Check runs before agent execution to avoid unnecessary compute costs
- Merged as union when importing workflows (all skip-roles from imported workflows are combined)
- Useful for AI moderation workflows that should only check external user content

**Example use case**: An AI content moderation workflow that checks issues for policy violations but exempts trusted team members with write access or higher.

### Skip Bots (`on.skip-bots`)

Skip workflow execution when triggered by specific GitHub actors (users or bots). Complements `skip-roles` by filtering based on actor identity rather than permission level.

```yaml wrap
on:
issues:
types: [opened]
skip-bots: [github-actions, copilot, dependabot]
```

**Bot name matching**: Automatic flexible matching handles bot names with or without the `[bot]` suffix. For example, specifying `github-actions` matches both `github-actions` and `github-actions[bot]` actors automatically.

**Behavior**:
- Workflow is cancelled during pre-activation when `github.actor` matches any listed actor
- Check runs before agent execution to avoid unnecessary compute costs
- Merged as union when importing workflows (all skip-bots from imported workflows are combined)
- Accepts both user accounts and bot accounts

**String or array format**:
```yaml wrap
# Single bot
skip-bots: github-actions

# Multiple bots
skip-bots: [github-actions, copilot, renovate]
```

**Example use cases**:
- Skip AI workflows when triggered by automation bots to avoid bot-to-bot interactions
- Prevent workflow loops where one workflow's output triggers another
- Exempt specific known bots from content checks or policy enforcement

### Strict Mode (`strict:`)

Enables enhanced security validation for production workflows. **Enabled by default**.
Expand Down
9 changes: 9 additions & 0 deletions docs/src/content/docs/setup/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,15 @@ gh aw logs -c 10 --start-date -1w # Filter by count and date
gh aw logs --ref main --parse --json # With markdown/JSON output for branch
```

**Workflow name matching**: The logs command accepts both workflow IDs (kebab-case filename without `.md`, e.g., `ci-failure-doctor`) and display names (from frontmatter, e.g., `CI Failure Doctor`). Matching is case-insensitive for convenience:

```bash wrap
gh aw logs ci-failure-doctor # Workflow ID
gh aw logs CI-FAILURE-DOCTOR # Case-insensitive ID
gh aw logs "CI Failure Doctor" # Display name
gh aw logs "ci failure doctor" # Case-insensitive display name
```

**Options:** `-c`, `--count`, `-e`, `--engine`, `--start-date`, `--end-date`, `--ref`, `--parse`, `--json`, `--repo`

#### `audit`
Expand Down