启用 PR 路径标签与位置检查,caller 支持 pull_request_target

This commit is contained in:
ddaodan committed 2026-10-18 08:52:12 +08:00
1 parent 8c0ea63062
commit 88c74df159
2 files changed
+45 -1

No files matched your search

+35
View File
@@ -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
+10 -1
View File
@@ -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 }}