Repository Rules
Create automated workflows using natural language - no code required
Overview
Create automated workflows using natural language - no code required. Just add markdown files to .gitar/rules/.
Triggers
Rules are evaluated when:
- Every push to a PR - Any new commits pushed to a pull request
- Metadata updates - Changes to PR title, description, reviewers, or labels
Structure
Rules are markdown files with YAML frontmatter and natural language content. Gitar runs actions when when matches.
| Field | Description |
|---|---|
title | Rule name |
description | Brief summary |
when | Condition that triggers the rule |
actions | What Gitar does when condition is met |
integrations | (Optional) External tools the rule needs |
Supported Actions
- Post comments on PRs or as inline code reviews
- Apply labels based on detected conditions
- Assign reviewers when specific changes are detected
- Suggest or make code changes
Supported Integrations
jira- Link PRs to tickets, update statusslack- Send notifications to channels
Debugging
Use display mode commands to see how rules are being evaluated:
gitar display:verbose- Show all rules with explanationsgitar display:compact- Show only relevant rules (default)
Example
.gitar/rules/security-review.md:
---
title: "Security Review"
description: "Require security team review for sensitive changes"
when: "PRs modifying authentication or encryption code"
actions: "Assign security team and add label"
---
# Security Review
When sensitive code is modified:
- Assign @security-team as reviewer
- Add "security-review" label
- Post comment with security checklist