Skip to content

GitHub Actions

RepoKeeper ships as one composite action. The root Marketplace action dispatches to all modules through a module input. It bundles checkout, Python setup, pip install repokeeper, and the selected module entrypoint into a single step.

Composite Actions

module Module
agent Implementation Agent
review Code Review Agent
describe PR description generator
radar Community Radar
monitor Alias for Community Radar
patrol Daily Patrol
labeler Auto-Labeler
release Release note drafter

Each action requires a workflow file in .github/workflows/ that defines the trigger, permissions, and job that calls the action.

Workflow: Implementation Agent

File: .github/workflows/repokeeper.yml

Triggers

on:
  issue_comment:
    types: [created]
  issues:
    types: [labeled]

Conditions

The workflow only runs when:

  1. Comment trigger: A collaborator comments /repokeeper go on an issue (not a PR):

    github.event_name == 'issue_comment' &&
    !github.event.issue.pull_request &&
    contains(github.event.comment.body, '/repokeeper go') &&
    github.event.comment.author_association in ('OWNER', 'MEMBER', 'COLLABORATOR')
    

  2. Label trigger: An issue is labeled agent-todo:

    github.event_name == 'issues' &&
    github.event.label.name == 'agent-todo'
    

Permissions

permissions:
  contents: write      # Push branches
  issues: write        # Comment on issues
  pull-requests: write # Create PRs

Steps

A single step calls the composite action:

steps:
  - uses: shenxianpeng/repokeeper@v1
    with:
      module: agent
      repo: ${{ github.repository }}
      issue: ${{ github.event.issue.number }}
      llm_api_key: ${{ secrets.DEEPSEEK_API_KEY }}
      llm_base_url: ${{ secrets.LLM_BASE_URL || 'https://api.deepseek.com' }}
      github_token: ${{ secrets.REPOKEEPER_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}

The composite action bundles checkout (fetch-depth: 0), Python 3.10+ setup, pip install repokeeper, and repokeeper agent internally.

Module Examples

Use the same root action for every RepoKeeper module:

- uses: shenxianpeng/repokeeper@v1
  with:
    module: review
    repo: ${{ github.repository }}
    pr: ${{ github.event.pull_request.number }}
    llm_api_key: ${{ secrets.DEEPSEEK_API_KEY }}
    github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: shenxianpeng/repokeeper@v1
  with:
    module: monitor
    repo: ${{ github.repository }}
    llm_api_key: ${{ secrets.DEEPSEEK_API_KEY }}
    github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: shenxianpeng/repokeeper@v1
  with:
    module: patrol
    repo: ${{ github.repository }}
    llm_api_key: ${{ secrets.DEEPSEEK_API_KEY }}
    github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: shenxianpeng/repokeeper@v1
  with:
    module: release
    repo: ${{ github.repository }}
    llm_api_key: ${{ secrets.DEEPSEEK_API_KEY }}
    github_token: ${{ secrets.GITHUB_TOKEN }}

Required Secrets

Secret Required Purpose
DEEPSEEK_API_KEY Yes AI model API key
LLM_BASE_URL No Custom LLM endpoint
REPOKEEPER_GITHUB_TOKEN No PAT fallback if GITHUB_TOKEN cannot create PRs

Pull request permissions

For the default GITHUB_TOKEN, enable Settings → Actions → General → Allow GitHub Actions to create and approve pull requests. If that is not allowed in your repository or organization, create a REPOKEEPER_GITHUB_TOKEN secret with contents and pull request write access.

Workflow: Community Radar

File: .github/workflows/radar.yml

Triggers

on:
  schedule:
    - cron: '0 */3 * * 1-5'  # Every 3 hours, Mon-Fri
  workflow_dispatch:           # Manual trigger

Permissions

permissions:
  issues: read
  discussions: read
  contents: read

Steps

steps:
  - uses: shenxianpeng/repokeeper@v1
    with:
      module: radar
      repo: ${{ github.repository }}
      llm_api_key: ${{ secrets.DEEPSEEK_API_KEY }}
      github_token: ${{ secrets.GITHUB_TOKEN }}

The composite action handles checkout, Python setup, installation, and the repokeeper radar --summary run.

Required Secrets

Secret Required Purpose
DEEPSEEK_API_KEY Yes AI model API key
RKP_SMTP_USER No Email notifications
RKP_SMTP_PASS No Email password
RKP_TELEGRAM_CHAT_ID No Telegram notifications

Workflow: Daily Patrol

File: .github/workflows/patrol.yml

Triggers

on:
  schedule:
    - cron: '0 8 * * 1-5'  # 8am UTC, Mon-Fri
  workflow_dispatch:         # Manual trigger

Permissions

permissions:
  issues: read
  pull-requests: write
  contents: write
  actions: read

Steps

steps:
  - uses: shenxianpeng/repokeeper@v1
    with:
      module: patrol
      repo: ${{ github.repository }}
      llm_api_key: ${{ secrets.DEEPSEEK_API_KEY }}
      github_token: ${{ secrets.GITHUB_TOKEN }}

The composite action handles checkout, Python setup, installation, and the repokeeper patrol --summary run.

Artifacts

The patrol generates a patrol-summary.md file uploaded as a GitHub Actions artifact for later review.

Adding to Your Repository

Option 1: Use the CLI

pip install repokeeper
repokeeper init --all-workflows

Option 2: Create workflows manually

Create workflow files in .github/workflows/ that reference the root composite action. See the templates for copyable examples.

Customizing Schedules

You can change the cron schedule in your repo's workflow files:

# Run every hour
- cron: '0 * * * *'

# Run at 9am daily
- cron: '0 9 * * *'

# Run on weekends too
- cron: '0 8 * * *'

# Run twice a day
- cron: '0 8,20 * * *'

Cron times are UTC

GitHub Actions uses UTC timezone. Schedule accordingly.

Rate Limits

GitHub API

GitHub Actions has generous rate limits (5,000 requests/hour for the GITHUB_TOKEN). RepoKeeper's API usage is minimal:

  • Radar: ~50 API calls per scan (issue listing)
  • Patrol: ~100 API calls per scan (workflows, issues, PR creation)
  • Agent: ~10 API calls per run (issue fetch, comment, PR creation)
  • Release: ~20 API calls per run plus merged PR search

LLM API

DeepSeek API limits vary by plan. Key usage points:

  • Radar: 1 LLM call per detected keyword match (classification)
  • Patrol: 1 LLM call per CI failure + 1 per stale issue
  • Agent: 1 LLM call per triggered implementation
  • Release: 1 LLM call per draft release

Set radar.keywords judiciously to control LLM usage.