Skip to content

Commit becdbcd

Browse files
committed
chore: add new GitHub action for smart commenting
1 parent 63891c7 commit becdbcd

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Smart commenting
2+
on:
3+
pull_request:
4+
types:
5+
- labeled
6+
jobs:
7+
8+
add-comment-for-GPG-Signing:
9+
if: github.event.label.name == 'GPG-Signing needed'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
pull-requests: write
13+
steps:
14+
- name: Add comment for GPG-sign
15+
uses: peter-evans/create-or-update-comment@v3
16+
with:
17+
issue-number: ${{ github.event.pull_request.number }}
18+
body: |
19+
You must GPG-sign your work, certifying that you either wrote the work or otherwise have the right to pass it on to an open-source project. See Developer's Certificate of Origin.
20+
See [signing][1].
21+
22+
**Note that all your commits must be signed.** If you have an unsigned commit, you can sign the previous commits by referring to [gpg-signing-old-commits][2].
23+
24+
[1]: https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#signing
25+
[2]: https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/workflow.md#gpg-signing-old-commits
26+
27+
add-comment-for-tests:
28+
if: github.event.label.name == 'tests needed'
29+
runs-on: ubuntu-latest
30+
permissions:
31+
pull-requests: write
32+
steps:
33+
- name: Add comment for PHPUnit test
34+
uses: peter-evans/create-or-update-comment@v3
35+
with:
36+
issue-number: ${{ github.event.pull_request.number }}
37+
body: |
38+
**Unit Testing:**
39+
Unit testing is expected for all CodeIgniter components. We use PHPUnit, and run unit tests using GitHub Actions for each PR submitted or changed.
40+
41+
**So please write a unit test or update the existing tests.**
42+
43+
See [unit testing][1] for more info.
44+
45+
[1]: https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#unit-testing

0 commit comments

Comments
 (0)