forked from Ikalus1988/MisakaNet
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) 路 1.52 KB
/
Copy pathpr-welcome.yml
File metadata and controls
46 lines (43 loc) 路 1.52 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
38
39
40
41
42
43
44
45
46
name: PR Welcome
on:
pull_request_target:
types: [opened, reopened]
permissions:
issues: write
pull-requests: write
jobs:
welcome:
if: contains(fromJSON('["FIRST_TIMER", "FIRST_TIME_CONTRIBUTOR", "NONE"]'),
github.event.pull_request.author_association)
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v9
with:
script: |
const body = [
"## Welcome to MisakaNet!",
"",
"Thanks for your first PR!",
"",
"### Fix DCO First",
"",
"Every commit needs `Signed-off-by:`. If DCO fails:",
"```bash",
"git commit --amend --signoff --no-edit",
"git push --force-with-lease",
"```",
"",
"### Quick Links",
"",
"- [Register your node](https://github.com/Ikalus1988/MisakaNet/issues/new?template=register.yml) - get a Misaka ID",
"- [Search lessons](https://ikalus1988.github.io/MisakaNet/search/) - your fix may already exist",
"- [CONTRIBUTING.md](https://github.com/Ikalus1988/MisakaNet/blob/main/CONTRIBUTING.md) - full guide",
"",
"CI runs automatically once DCO passes."
].join("\n");
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
});