-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.43 KB
/
pr.yml
File metadata and controls
37 lines (32 loc) · 1.43 KB
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
name: Promote Mailing List (PR)
on:
pull_request:
types:
- opened
jobs:
auto-reply:
runs-on: ubuntu-latest
steps:
- name: Skip if PR author is milobanks
id: check_author
run: |
if [[ "${{ github.event.pull_request.user.login }}" == "milobanks" ]]; then
echo "Skipping because author is milobanks."
echo "skip_reply=true" >> $GITHUB_ENV
fi
- name: Comment on new pull request
if: env.skip_reply != 'true'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.PAT }}
script: |
const repo = context.repo.repo;
const pr_number = context.payload.pull_request.number;
const message = `Thanks for the pull request! I don't merge PRs directly into GitHub, but we can discuss it here, and then I can create and apply the patch myself.
If you'd prefer, you can also send patches via the mailing list at https://lists.sr.ht/~milobanks/${repo}.`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr_number,
body: message
});