-
Notifications
You must be signed in to change notification settings - Fork 1.3k
39 lines (36 loc) · 1.75 KB
/
first-time-contributor.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
31
32
33
34
35
36
37
38
39
name: First-Time Contributor Welcome
on:
pull_request:
types: [opened]
jobs:
welcome:
runs-on: ubuntu-latest
if: github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
steps:
- name: Leave Welcome Comment
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Welcome, @${{ github.event.pull_request.user.login }}! Thank you for your first contribution! 🎉 A contributor will be by to give feedback soon. In the meantime, please review the [Newcomers' Guide](https://layer5.io/community/newcomers) and be sure to join the [community Slack](https://slack.layer5.io/).
<p align="center" width="100%">
<img src="https://github.com/user-attachments/assets/f3f7d995-fc9a-4aec-8c9d-ed6570fb56ab" width="65%" />
</p>
Be sure to double-check that you have signed your commits.
Here are instructions for [making signing an implicit activity while peforming a commit](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)."
});
- name: Label Pull Request (Optional)
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['first-time contributor']
});