[CI] remove auto-labeling run-ci label. (#13486)
This commit is contained in:
25
.github/workflows/labeler.yml
vendored
25
.github/workflows/labeler.yml
vendored
@@ -12,34 +12,9 @@ jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Step 1: Add category labels based on file changes
|
||||
- name: Auto-label by file changes
|
||||
uses: actions/labeler@v5
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: .github/labeler.yml
|
||||
sync-labels: false
|
||||
|
||||
# Step 2: Add run-ci label for authorized users (only on opened/reopened)
|
||||
- name: Check user permission
|
||||
if: github.event.action == 'opened' || github.event.action == 'reopened'
|
||||
id: checkAccess
|
||||
uses: actions-cool/check-user-permission@v2
|
||||
with:
|
||||
require: write
|
||||
username: ${{ github.triggering_actor }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Add run-ci label
|
||||
if: (github.event.action == 'opened' || github.event.action == 'reopened') && steps.checkAccess.outputs.require-result == 'true'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GH_PAT_FOR_PULL_REQUEST }}
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
labels: ['run-ci']
|
||||
})
|
||||
|
||||
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -10,7 +10,7 @@ on:
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(github.event.pull_request.labels.*.name, 'run-ci')
|
||||
if: contains(github.event.pull_request.labels.*.name)
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user