-
Notifications
You must be signed in to change notification settings - Fork 47
35 lines (31 loc) · 1.09 KB
/
Copy pathpr-labeler-v2.yml
File metadata and controls
35 lines (31 loc) · 1.09 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
name: "PR Labeler for Hacktoberfest (v2)"
on:
pull_request_target:
types: [opened, reopened, closed]
jobs:
add-labels:
runs-on: ubuntu-latest
permissions:
pull-requests: write # ✅ allow labeling
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Add default label when PR is created
if: github.event.action == 'opened' || github.event.action == 'reopened'
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: |
pr-opened
- name: Add Hacktoberfest labels when PR is merged
if: github.event.action == 'closed' && github.event.pull_request.merged == true
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: |
hacktoberfest
hacktoberfest_2025
hacktoberfest-accepted