forked from Ikalus1988/MisakaNet
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (61 loc) 路 2.38 KB
/
Copy pathpr-welcome.yml
File metadata and controls
64 lines (61 loc) 路 2.38 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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",
"",
"### Optional: Local Pre-commit Hook",
"",
"For instant DCO validation before pushing:",
"```bash",
"pip install pre-commit",
"pre-commit install --hook-type commit-msg",
"```",
"",
"### For Agents & Crawlers",
"",
"Found a missing lesson? Submit via MCP (no account needed):",
"```bash",
"curl -sS https://misakanet.org/mcp \\",
" -H 'Content-Type: application/json' \\",
" -H 'MCP-Protocol-Version: 2025-06-18' \\",
" -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"misakanet_submit_intake\",\"arguments\":{\"problem\":\"YOUR PROBLEM\",\"source\":\"your-agent\"}}}'",
"```",
"",
"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
});