Skip to content

fix: 安卓端屏蔽用户存在漏屏蔽情况 #352

fix: 安卓端屏蔽用户存在漏屏蔽情况

fix: 安卓端屏蔽用户存在漏屏蔽情况 #352

Workflow file for this run

name: Auto Label PR
on:
pull_request:
types: [opened, edited, synchronize]
permissions:
pull-requests: write
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
env:
PRPAT: ${{ secrets.PRPAT }}
if: ${{ env.PRPAT != '' }}
with:
github-token: ${{ secrets.PRPAT }}
script: |
const title = context.payload.pull_request.title;
let label = null;
if (/^feat(\(.+\))?[!:]/.test(title)) {
label = 'enhancement';
} else if (/^fix(\(.+\))?[!:]/.test(title)) {
label = 'bug';
}
if (label) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: [label],
});
}