Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GitHub Action] add flow for welcoming first-time-contributors #5748

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/first-time-contributor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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: |
const message = `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).`;
vishalvivekm marked this conversation as resolved.
Show resolved Hide resolved

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: message
});
- 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']
});
Loading