Skip to content
Draft
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
30 changes: 30 additions & 0 deletions .github/workflows/pr-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PR Agent (DeepSeek)

on:
pull_request:
types: [opened, reopened, ready_for_review]
issue_comment:
types: [created]

jobs:
pr_agent_job:
if: ${{ github.event.sender.type != 'Bot' }}
runs-on: ubuntu-latest
permissions:
issues: write

Check failure

Code scanning / checkov

Ensure top-level permissions are not set to write-all Error

Ensure top-level permissions are not set to write-all
Comment on lines +13 to +14
pull-requests: write
contents: write
name: Run PR Agent on every pull request, respond to user comments
steps:
- name: PR Agent action step
id: pragent
uses: the-pr-agent/pr-agent@main
env:
OPENAI_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG.MODEL: "deepseek/deepseek-chat"
CONFIG.FALLBACK_MODELS: '["deepseek/deepseek-chat"]'
GITHUB_ACTION_CONFIG.AUTO_REVIEW: "true"
GITHUB_ACTION_CONFIG.AUTO_DESCRIBE: "true"
GITHUB_ACTION_CONFIG.AUTO_IMPROVE: "true"
CONFIG.AI_TIMEOUT: "180"
36 changes: 36 additions & 0 deletions .pr_agent.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[config]
model = "deepseek/deepseek-chat"
fallback_models = ["deepseek/deepseek-chat"]
ai_timeout = 180

[github_action_config]
auto_review = true
auto_describe = true
auto_improve = true
pr_actions = ["opened", "reopened", "ready_for_review"]

[pr_reviewer]
extra_instructions = """\
Focus on the following aspects during review:
- Security vulnerabilities and unsafe code patterns
- Logic errors and edge cases not handled
- Performance bottlenecks and inefficient algorithms
- API design, breaking changes, and backward compatibility
- Proper error handling and logging
- Code maintainability, readability, and adherence to project conventions
- Missing tests or insufficient test coverage for the changes
"""
num_max_findings = 5
require_tests_review = true
require_security_review = true
require_estimate_effort_to_review = true

[pr_description]
generate_ai_title = true
use_bullet_points = true
enable_pr_diagram = true

[pr_code_suggestions]
num_code_suggestions = 6
suggestions_score_threshold = 5
focus_only_on_problems = true
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,6 @@ dotnet test --collect:"XPlat Code Coverage"
See the canonical AI rule set under `docs/ai/rules/`:
- **Rule Index**: `docs/ai/rules/README.md`
- **Copilot Entrypoint**: `.github/copilot-instructions.md`
- **Agent Entrypoint**: `AGENTS.md`
- **Agent Entrypoint**: `AGENTS.md`

<!-- PR-Agent verification -->
Loading