Real-World Usage
Examples
Practical examples and configurations for common use cases.
What's Available
🤖
AI MR Review
Automated code review on merge requests using AI
GitLab CI
GitHub Actions
AI
👋
Human-in-Loop Approval
Two-stage approval with Slack notification and manual trigger
GitLab CI
Slack
Approval
🔔
Push Notification
Notify your team on every push to main/master
GitLab CI
GitHub Actions
Slack
📊
Jira Integration
Create Jira issues from CI events using subprocess modules
GitLab CI
Jira
GitLab CI Configurations
AI-Powered MR Review
Automated code review using AI on merge requests
stages:
- review
ai-mr-review:
stage: review
image: ghcr.io/rajitk13/shiro-automation:latest
variables:
GITLAB_TOKEN: $GL_TOKEN
script:
- shiro run -workflow .shiro/workflows/code-review.json -config .shiro/config.yaml -state-store gitlab
artifacts:
paths:
- .shiro/state/
expire_in: 1 day
only:
- merge_requestsThis workflow automatically reviews merge requests using AI, providing feedback on code quality and potential issues.
GitLab CI
AI
Workflow Definitions
Simple Test Workflow
Basic workflow with print steps
{
"name": "simple-test",
"description": "Simple test workflow using print module",
"steps": [
{
"id": "test_info",
"type": "print",
"config": {
"message": "Starting simple test workflow",
"level": "info"
}
},
{
"id": "test_debug",
"type": "print",
"config": {
"message": "Debug: Testing variable resolution",
"level": "debug"
}
},
{
"id": "test_complete",
"type": "print",
"config": {
"message": "Test workflow completed successfully!",
"level": "info"
}
}
]
}Configuration Examples
AI Provider Configuration
Configure multiple AI providers in config.yaml
models:
# Ollama local models
codellama:
type: ollama
model: codellama:34b
base_url: http://localhost:11434
# OpenAI-compatible providers
gpt-4:
type: openai
model: gpt-4
base_url: https://api.openai.com/v1
api_key: "{"{env.OPENAI_API_KEY}"}"
# Gemini (Google AI Studio)
gemini:
type: gemini
model: gemini-1.5-pro
api_key: "{"{env.GEMINI_API_KEY}"}"
api_type: "google-ai-studio"
# Custom OpenAI-compatible endpoint
custom-llm:
type: openai
model: custom-model
base_url: http://localhost:8000/v1
api_key: "sk-custom-key"