-
Notifications
You must be signed in to change notification settings - Fork 251
30 lines (29 loc) · 990 Bytes
/
labeler.yml
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
name: labeler
on:
pull_request_target:
types: ['opened', 'ready_for_review', 'reopened', 'synchronize']
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
name: Label the PR size
steps:
- uses: actions/checkout@v4
with: # checkout the base branch, where we run the script from
path: base
- uses: actions/checkout@v4
with: # checkout the merge commit, where the PR changes are
ref: refs/pull/${{ github.event.number }}/merge
path: merge
# we need full history
fetch-depth: 0
- name: Run labeler script from base
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
FAIL_IF_XL: '1'
MAIN_BRANCH: ${{ github.event.pull_request.base.ref }}
run: cd merge && ../base/devtools/scripts/github-set-pr-label.sh