From d8c750f2b36ca948f33bc14018f901e866da5644 Mon Sep 17 00:00:00 2001 From: wokron Date: Thu, 25 Jun 2026 15:12:10 +0800 Subject: [PATCH] add pr-agent --- .github/workflows/pr-agent.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/pr-agent.yml diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml new file mode 100644 index 00000000..70efcf63 --- /dev/null +++ b/.github/workflows/pr-agent.yml @@ -0,0 +1,30 @@ +name: PR Agent + +on: + issue_comment: + types: [created, edited] + +permissions: + issues: write + pull-requests: write + +jobs: + pr_agent_job: + name: PR Agent + runs-on: ubuntu-26.04 + if: | + github.event.sender.type != 'Bot' && + github.event.issue.pull_request && + startsWith(github.event.comment.body, '/') && + contains(fromJSON('["OWNER", "COLLABORATOR", "MEMBER"]'), github.event.comment.author_association) + steps: + - name: PR Agent Step + id: pragent + uses: the-pr-agent/pr-agent@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CONFIG.MODEL: "deepseek/deepseek-chat" + CONFIG.FALLBACK_MODELS: "['deepseek/deepseek-chat']" + DEEPSEEK.KEY: ${{ secrets.DEEPSEEK_API_KEY }} + PR_REVIEWER.ENABLE_REVIEW_LABELS_EFFORT: false + PR_REVIEWER.ENABLE_REVIEW_LABELS_SECURITY: false