Skip to content

Commit 0c9c922

Browse files
authored
Added first-time-contributor badge processing
1 parent 34e8b6a commit 0c9c922

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

.github/label-actions.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,20 @@ status:spfx-doctor:
106106
We appreciate your understanding and cooperation!
107107
108108
# Close the issue
109-
close: true
109+
close: true
110+
111+
# First time contributors
112+
first-time-contributor:
113+
comment: |+
114+
## First-Time Contributor
115+
116+
Thank you for your contribution! It looks like that you are a first-time contributor in this repository.
117+
118+
Did you know that you are eligible for the PnP Recognition program, and that your submission will qualify for a badge :-) ?
119+
120+
All you need to do is to register at https://pnp.github.io/recognitionprogram. Once you are registered, we'll automatically assign contribution badges for qualifying contributions.
121+
122+
We hope to see more contributions from you in the future!!!
123+
124+
# Don't close
125+
close: false

.github/workflows/label-actions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
- uses: dessant/label-actions@v2
1212
with:
1313
github-token: ${{ github.token }}
14-
process-only: 'issues'
14+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# .github/workflows/label-first-timers.yml
2+
name: Label First-Time Contributors
3+
4+
on:
5+
pull_request:
6+
types: [closed]
7+
8+
jobs:
9+
label-first-timer:
10+
if: >
11+
github.event.pull_request.merged == true &&
12+
(
13+
github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' ||
14+
github.event.pull_request.author_association == 'FIRST_TIMER'
15+
)
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Add “first-time-contributor” label
20+
uses: actions-ecosystem/add-labels@v1
21+
with:
22+
github_token: ${{ secrets.GITHUB_TOKEN }}
23+
labels: first-time-contributor

0 commit comments

Comments
 (0)