Skip to content

Commit 3b16cd0

Browse files
authored
Add workflow to greet first-time contributors (#376)
1 parent 93c17d9 commit 3b16cd0

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Summary: add a welcoming comment to first-time contributors' issues & PRs.
2+
# This is written in a generic way so that we can use the same workflow
3+
# in all our quantumlib repos.
4+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5+
6+
name: Welcome first interactions
7+
run-name: Welcome ${{github.actor}}'s first interaction
8+
9+
on:
10+
issues:
11+
types: [opened]
12+
pull_request:
13+
types: [opened]
14+
15+
# Declare default permissions as read-only.
16+
permissions: read-all
17+
18+
jobs:
19+
welcome:
20+
name: Check for first interaction
21+
runs-on: ubuntu-24.04
22+
timeout-minutes: 10
23+
permissions:
24+
issues: write
25+
pull-requests: write
26+
env:
27+
repo: ${{github.server_url}}/${{github.repository}}
28+
files: ${{github.server_url}}/${{github.repository}}/blob/${{github.ref_name}}
29+
steps:
30+
- name: Add a welcome comment if appropriate
31+
uses: actions/first-interaction@2ec0f0fd78838633cd1c1342e4536d49ef72be54 # v1.3.0
32+
with:
33+
repo-token: ${{secrets.GITHUB_TOKEN}}
34+
issue-message: |
35+
Hello and welcome, ${{github.actor}} 👋!
36+
37+
Thanks for filing your first issue with the ${{github.repository}}
38+
project! Here are some quick tips:
39+
40+
- Please make sure to read our [community participation
41+
guidelines](${{env.files}}/CODE_OF_CONDUCT.md).
42+
43+
- If this is a bug report, we'll probably need the following
44+
details in order to diagnose the issue. If they're not in the
45+
original issue description, please consider adding them now:
46+
47+
- [ ] Environment you are using (MacOS, Windows, Colab, etc.)
48+
- [ ] Version of Python you are using
49+
- [ ] Steps to reproduce the issue
50+
51+
- Please look through [existing issues](${{env.repo}}/issues) for
52+
any that look the same as this one. If you find a similar issue,
53+
consider closing this one; if you don't want to close this one, can
54+
you explain how this new one differs from the other one?
55+
pr-message: |
56+
Hello and welcome, ${{github.actor}} 👋!
57+
58+
Thanks for making your first pull request to the
59+
${{github.repository}} project! Here are some quick tips:
60+
61+
- Please make sure to read the [contributing
62+
guide](${{env.files}}/CONTRIBUTING.md) and [community participation
63+
guidelines](${{env.files}}/CODE_OF_CONDUCT.md).
64+
65+
- All contributors must sign the [Contributor License
66+
Agreement](https://cla.developers.google.com/about) (CLA). If
67+
[googlebot](https://github.com/googlebot) leaves a comment on this
68+
pull request, make sure you follow the instructions it provides.
69+
70+
- If this pull request fixes a bug, please reference the relevant
71+
issue number in the [issue tracker](${{env.repo}}/issues).
72+
73+
Please allow time for the project community to be able to read and
74+
evaluate your pull request. Thanks again!

0 commit comments

Comments
 (0)