From 88c74df159ecb7977da8ddb7748cbd3edf6fdf33 Mon Sep 17 00:00:00 2001 From: ddaodan <731882332@qq.com> Date: Sun, 18 Oct 2026 08:52:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E7=94=A8=20PR=20=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=B8=8E=E4=BD=8D=E7=BD=AE=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=EF=BC=8Ccaller=20=E6=94=AF=E6=8C=81=20pull=5Frequest=5Ftarget?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/repo-bot.yml | 35 ++++++++++++++++++++++++++++++++++ .github/workflows/repo-bot.yml | 11 ++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/.github/repo-bot.yml b/.github/repo-bot.yml index 920b80df7..9d3b76e65 100644 --- a/.github/repo-bot.yml +++ b/.github/repo-bot.yml @@ -302,3 +302,38 @@ pullRequests: enabled: false summary: enabled: false + pathLabels: + enabled: true + managed: true + documentationLabel: documentation + commentAnchor: pull-bot:path-labels + rules: + - label: JS 脚本 + pathPrefixes: + - repo/js + - label: 地图追踪 + pathPrefixes: + - repo/pathing + - label: 战斗策略 + pathPrefixes: + - repo/combat + - label: 七圣召唤 + pathPrefixes: + - repo/tcg + locationCheck: + enabled: true + commentAnchor: pull-bot:location + allowedPaths: + - build + - .github + scriptRoots: + - repo/js + fileKindRules: + - category: 战斗策略 + expectedLocation: repo/combat + extensions: + - .txt + rules: + pathingFileNamePattern: ^\d{2,3}- + issueLink: + enabled: false diff --git a/.github/workflows/repo-bot.yml b/.github/workflows/repo-bot.yml index bfe68db16..82b962867 100644 --- a/.github/workflows/repo-bot.yml +++ b/.github/workflows/repo-bot.yml @@ -1,5 +1,5 @@ name: Repo Bot -run-name: "Repo Bot #${{ github.event.issue.number }} - ${{ github.event_name }}/${{ github.event.action }} - @${{ github.actor }}" +run-name: "Repo Bot #${{ github.event.issue.number || github.event.pull_request.number }} - ${{ github.event_name }}/${{ github.event.action }} - @${{ github.actor }}" on: issues: @@ -11,6 +11,14 @@ on: types: - created - edited + # pull_request_target (not pull_request) is required so that pull requests opened from + # forks can be labelled/commented. Never check out or execute the pull request head here. + pull_request_target: + types: + - opened + - synchronize + - reopened + - ready_for_review jobs: repo-bot: @@ -24,6 +32,7 @@ jobs: uses: ddaodan/bettergi-github-bot/.github/workflows/repo-bot.yml@v1 permissions: issues: write + pull-requests: write contents: read secrets: REPO_BOT_AI_API_KEY: ${{ secrets.REPO_BOT_AI_API_KEY }}