-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.29 KB
/
label.yml
File metadata and controls
42 lines (35 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: PR Generate Labels
on:
pull_request_target:
types: [opened, reopened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
AutoLabelPR:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Apply Labels Based on File Paths
uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Apply Labels Dynamically with GitHub Script
uses: actions/github-script@v7
with:
script: |
const labeler = require('./.github/ci-scripts/labeler.js');
await labeler({ github, context });
SizeLabelPR:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Label PR based on size
uses: cbrgm/pr-size-labeler-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # Pass the GitHub token for authentication
github_repository: ${{ github.repository }} # Pass the repository name
github_pr_number: ${{ github.event.number }} # Pass the pull request number
config_file_path: '.github/pull-request-size.yml' # Specify the path to the configuration file