-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (31 loc) · 893 Bytes
/
Copy pathlabeler.yml
File metadata and controls
33 lines (31 loc) · 893 Bytes
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
name: 'PR Labeler'
on:
pull_request_target:
workflow_dispatch:
inputs:
prs:
required: false
description: 'pr number'
jobs:
labeler:
permissions:
contents: read
pull-requests: write
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Set PR number
id: set-pr
run: |
echo "Using PR number: ${{ github.event.inputs.prs || github.event.pull_request.number }}"
echo "pr=${{ github.event.inputs.prs || github.event.pull_request.number }}" >> $GITHUB_OUTPUT
- uses: actions/labeler@v6
with:
pr-number: ${{ steps.set-pr.outputs.pr }}