A collection of GitHub Actions workflows for automated repository management and maintenance.
Automates the process of cherry-picking commits to multiple target branches and creating pull requests.
- Multi-branch cherry-picking: Apply commits to multiple branches simultaneously
- Pull request creation: Automatically creates PRs for each target branch
- Flexible targeting: Support for any combination of branches
- Batch processing: Handle multiple commits in specified order
gh workflow run cherry-pick-commit.yml \
-f repository=alaudadevops/my-repo \
-f commits=abc123,def456,ghi789 \
-f target_branches=release-1.0,release-1.1,main \
-f pr_title_prefix="[Hotfix]"Runs custom dependabot scripts for dependency management across repositories.
- Scheduled execution: Runs weekly on Mondays at 7 AM UTC
- Custom scripts: Execute Python-based dependency management scripts
- Configurable: Specify repository, revision, and script to run
- Repository:
alaudadevops/hack - Branch:
main - Script:
python run-bot.py
Synchronizes files across multiple repositories in an organization using configuration-driven approach.
- Config-driven: Uses YAML configuration files to define sync rules
- Regex support: Target repositories using regex patterns
- PR creation: Automatically creates pull requests with synced changes
- Dry run mode: Test sync operations without creating actual PRs
gh workflow run file-sync.yaml \
-f config_file=".github/sync/custom-config.yaml" \
-f repositories="regex:AlaudaDevops/.*" \
-f dry_run=trueSynchronizes changes from a source repository to a target repository, useful for maintaining documentation or shared files.
- Selective sync: Configure specific paths to sync or ignore
- Reusable workflow: Can be called by other workflows
- Path filtering: Fine-grained control over what gets synced
- Ignored paths:
.github/,README.md - Synced paths:
docs/,.yarn/, config files
Executes integration tests in a Kubernetes environment using Kind clusters.
- Kubernetes testing: Sets up Kind cluster for testing
- Tool integration: Includes kubectl and Tekton CLI (tkn)
- Flexible scripting: Run custom test scripts
- Multi-environment: Support for different repositories and revisions
- kubectl (Kubernetes CLI)
- tkn (Tekton CLI)
- Kind (Kubernetes in Docker)
Applies organizational rules and configurations to specific Alauda repositories.
- Scheduled execution: Runs weekly on Sundays at midnight
- Repository-specific: Targets specific documentation repositories
- Automated governance: Ensures consistent repository settings
- devops-docs, devops-pipelines-docs, devops-connectors-docs
- gitlab-docs, harbor-docs, sonarqube-docs, nexus-docs
General-purpose organizational rule setup for AlaudaDevops repositories.
- Daily execution: Runs daily at 6:25 AM UTC
- Configurable: Specify repository, branch, and script
- Organization-wide: Applies rules across all organization repositories
- Repository:
alaudadevops/hack - Branch:
main - Script:
./scripts/setup-repos.sh alaudadevops
Advanced documentation synchronization between repositories with sophisticated change detection.
- Change detection: Only syncs when changes are detected
- Force sync option: Override change detection when needed
- Selective path sync: Configure exactly which paths to synchronize
- Reusable workflow: Can be called by other workflows
docs/- Documentation files.yarn/- Yarn configurationdoom.config.yml,yarn.lock,tsconfig.json,package.json,sites.yaml
AI-powered code review for pull requests using OpenCode (current default model: codex/gpt-5.3-codex).
- AI Code Review: Automated code review using OpenCode with configurable AI models (current default:
codex/gpt-5.3-codex) - Shared Prompt: Centralized review guidelines in this repository (
.github/prompts/code-review.md) - Centralized Repository Profiles: Repository-specific prompt files are managed centrally in this repository (
.github/review/profiles/<owner>/<repo>/) - Alauda Internal Skills (Default-On): Bootstrap
alauda-ai-base+alauda-ai-builders, then install discovered skills to native~/.config/opencode/skillsfor OpenCode skill discovery - Comment Management: Creates or updates a single review comment (no spam)
- Dry Run Mode: Test the review without posting comments
- Multiple Review Styles: Strict, balanced, or lenient review approach
The review uses a layered prompt system:
-
Shared Prompt (
.github/prompts/code-review.mdin this repo):- Common review guidelines for all repositories
- Code quality, security, performance, and best practices
-
Repository Prompt (default
pr-review.mdin centralized profile):- Repository-specific guidelines
- Project conventions, tech stack, and custom rules
- Optional - falls back to shared prompt only if profile/prompt is not present
-
Alauda Skill Guidance (enabled by default):
- Bootstraps Alauda internal skills using
setup.sh --team devops --dir ... - Installs discovered skills into OpenCode native path (
~/.config/opencode/skills) and verifies visibility withopencode debug skill - No extra skills catalog section is appended to the review prompt; skill content is resolved through native discovery when needed
- Defaults: include all discovered skills (
["*"]),fail_on_setup_error=false(review continues without internal skills if setup fails)
- Bootstraps Alauda internal skills using
Create a repository profile directory in this repository:
.github/review/profiles/<owner>/<repo>/
pr-review.md
Example (AlaudaDevops/catalog):
.github/review/profiles/alaudadevops/catalog/pr-review.md
Repository matching is case-insensitive. The workflow normalizes inputs.repository to lowercase before resolving <owner>/<repo>.
Rules:
pr-review.mdis the only supported profile prompt filename- Prompt content is loaded from the
run-actionsworkflow revision (github.sha) - If the profile directory or
pr-review.mdis missing, the workflow falls back to shared prompt only - Skill loading is independent of profile files and uses defaults: team
devops, include["*"],fail_on_setup_error=false
Trigger from run-actions repository:
gh workflow run kilo-pr-review.yaml \
--repo alaudadevops/run-actions \
-f repository="alaudadevops/my-project" \
-f pr_number="123" \
-f review_style="balanced" \
-f dry_run=falseAdd to your repository:
Copy the example workflow from .github/examples/trigger-kilo-review.yaml to your repository's .github/workflows/kilo-review.yaml:
# .github/workflows/kilo-review.yaml
name: Kilo PR Review
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
trigger-review:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]' && (github.event_name != 'pull_request' || github.event.pull_request.draft != true)
steps:
- name: Trigger Kilo PR Review
run: |
gh workflow run kilo-pr-review.yaml \
--repo alaudadevops/run-actions \
--field repository="${{ github.repository }}" \
--field pr_number="${{ github.event.pull_request.number }}" \
--field review_style="balanced"
env:
GH_TOKEN: ${{ secrets.RUN_ACTIONS_TOKEN }}Add repository profile to run-actions:
- Create
.github/review/profiles/<owner>/<repo>/pr-review.mdfor repository-specific guidance (recommend using lowercase owner/repo path).
| Parameter | Description | Default |
|---|---|---|
repository |
Target repository (owner/repo) | Required |
pr_number |
Pull request number | Required |
review_style |
Review strictness (strict/balanced/lenient) | strict |
dry_run |
Test mode without posting comments | false |
TOKEN: GitHub token with repo access to target repositoriesOPENAI_TOKEN: API key for OpenAI-compatible endpoint (required for current default model setup)OPENAI_BASEURL: Optional custom OpenAI-compatible endpointRUN_ACTIONS_TOKEN(in your repo): Token to trigger workflows in run-actions
Using the alternative workflow (.github/examples/trigger-kilo-review-dispatch.yaml), you can trigger reviews by commenting on a PR:
/kilo-review
/kilo-review --style strict
/kilo-review --style lenient
A Claude Code skill for performing comprehensive code reviews that outputs structured feedback for GitHub PRs.
This skill is designed to be used with Claude Code to review pull requests and generate:
pr-overview.md- A summary comment to post on the PRpr-comments.json- Inline review comments in reviewdog rdjson format
| File | Purpose |
|---|---|
.github/prompts/code-review.md |
Main skill prompt with review guidelines and output formats |
.github/prompts/code-review-personalized.example.md |
Template for repository-specific customization |
- Get the PR diff:
gh pr diff <PR_NUMBER> > pr-diff.patch- Run the review with Claude Code:
claude --print "Review this PR diff using the guidelines from .github/prompts/code-review.md:
$(cat pr-diff.patch)"- Post the overview comment:
gh pr comment <PR_NUMBER> --body-file pr-overview.md- Post inline comments using reviewdog:
cat pr-comments.json | reviewdog -f=rdjson -reporter=github-pr-reviewA markdown summary with:
- Brief assessment of the PR
- Statistics (critical issues, warnings, suggestions)
- Categorized list of issues with file:line references
- Positive feedback on well-written code
A JSON file in reviewdog rdjson format:
{
"source": {
"name": "claude-code-review",
"url": "https://github.com/alaudadevops/run-actions"
},
"diagnostics": [
{
"message": "Potential SQL injection vulnerability",
"location": {
"path": "src/db/queries.ts",
"range": {
"start": { "line": 42, "column": 1 },
"end": { "line": 42, "column": 80 }
}
},
"severity": "ERROR",
"code": {
"value": "security/sql-injection"
},
"suggestions": [
{
"text": "const result = await db.query('SELECT * FROM users WHERE id = $1', [userId]);"
}
]
}
]
}| Level | Usage |
|---|---|
ERROR |
Critical issues (security, bugs, breaking changes) - must fix before merge |
WARNING |
Should fix but not blocking |
INFO |
Suggestions for improvement |
HINT |
Minor style/convention suggestions |
security/*- Security vulnerabilities (xss, sql-injection, secrets)bug/*- Potential bugs (null-pointer, race-condition, off-by-one)performance/*- Performance issues (n-plus-one, memory-leak)style/*- Style issues (naming, formatting)refactor/*- Refactoring suggestions (duplication, complexity)docs/*- Documentation issues (missing, outdated)test/*- Testing issues (missing, coverage)
Create .github/prompts/code-review.md in your repository (copy from code-review-personalized.example.md) to add:
- Project-specific tech stack details
- Custom naming conventions
- Security requirements
- Performance guidelines
- Testing requirements
- Patterns to ignore
You can automate the review process with a GitHub Action:
name: Claude Code Review
on:
pull_request:
types: [opened, synchronize]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get PR diff
run: gh pr diff ${{ github.event.pull_request.number }} > pr-diff.patch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Claude Code review
run: |
# Run claude code review (requires ANTHROPIC_API_KEY)
claude --print "Review this PR using .github/prompts/code-review.md guidelines:
$(cat pr-diff.patch)" > review-output.md
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- name: Post overview comment
if: always()
run: |
if [ -f pr-overview.md ]; then
gh pr comment ${{ github.event.pull_request.number }} --body-file pr-overview.md
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Post inline comments
if: always()
run: |
if [ -f pr-comments.json ]; then
cat pr-comments.json | reviewdog -f=rdjson -reporter=github-pr-review
fi
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}All workflows require the following secret to be configured in the repository:
TOKEN: GitHub Personal Access Token with appropriate permissions:repo(full repository access)read:org(read organization membership)workflow(trigger workflows)- Additional permissions as needed per workflow
Automatically manages inactive pull requests across an organization by warning, closing, and cleaning up stale branches.
- Multi-stage lifecycle management: Warning → Close → Delete
- Configurable timeframes: Customize warning, closing, and deletion periods
- Branch protection: Protect important branches from deletion using wildcard patterns
- Organization-wide: Process all repositories in a specified GitHub organization
- Dry run support: Test configuration without making actual changes
- Detailed logging: Comprehensive reporting of all actions taken
The workflow supports both scheduled execution and manual triggering with custom parameters:
Parameters:
organization: GitHub organization to process (default: "alauda")warning_days: Days before warning about inactivity (default: 30)close_days: Days before closing inactive PR (default: 60, must be > warning_days)delete_days: Days before deleting stale branch (default: 90, must be > close_days)protected_branches_pattern: Comma-separated patterns to protect (default: "main,release-,alauda-")dry_run: Test mode without making changes (default: false)
Schedule:
- Runs daily at 2 AM UTC
- Can be triggered manually via workflow_dispatch
The workflow supports protecting branches from deletion using patterns:
- Exact matches:
main,develop - Wildcard patterns:
release-*,alauda-*,feature-* - Multiple patterns: Comma-separated list
Protected branches will never be deleted, even after the deletion period.
- Validation: Ensures close_days > warning_days > delete_days
- Repository Discovery: Finds all repositories in the specified organization
- PR Analysis: For each open PR, calculates days since last activity
- Action Execution:
- Warning Stage (after X days): Adds a warning comment explaining the lifecycle
- Close Stage (after Y days): Closes the PR with an explanation comment
- Delete Stage (after Z days): Deletes the branch (if not protected and PR is closed)
Manual Execution with Custom Parameters:
# Via GitHub UI: Actions → Manage Stale Pull Requests → Run workflow
# Or via CLI:
gh workflow run manage-stale-prs.yaml \
-f organization=myorg \
-f warning_days=14 \
-f close_days=30 \
-f delete_days=45 \
-f protected_branches_pattern="main,master,release-*,hotfix-*" \
-f dry_run=trueScheduled Execution: The workflow runs automatically every day at 2 AM UTC using the default parameters.
TOKEN: GitHub Personal Access Token with the following permissions:repo(full repository access)read:org(read organization membership)delete_repo(delete repository branches)
🔍 Managing stale PRs for organization: myorg
📅 Configuration:
- Warning after: 30 days
- Close after: 60 days
- Delete branch after: 90 days
- Protected branches: main,release-*,alauda-*
🔄 Processing repository: myorg/example-repo
📋 Found 3 open PR(s)
🔍 PR #123: "Add new feature"
📅 Last updated: 45 days ago
🌿 Branch: feature/new-feature
👤 Author: developer1
🔒 Closing inactive PR
✅ PR closed and commented
📊 Summary:
- Repositories processed: 15
- PRs warned: 5
- PRs closed: 3
- Branches deleted: 2