-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (48 loc) · 2.09 KB
/
issue-welcome.yml
File metadata and controls
54 lines (48 loc) · 2.09 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
name: Issue — Welcome & Label
on:
issues:
types: [opened]
jobs:
welcome:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Apply user-replied label
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['user-replied']
});
- name: Post welcome comment
uses: actions/github-script@v7
with:
script: |
const author = context.payload.issue.user.login;
const repoName = context.repo.repo;
const body = [
`Hey @${author}, an unexpected event has arrived — your issue report! ⚡`,
``,
`@TheCodingDad-TisonK has been notified and will investigate as soon as possible.`,
``,
`**To help reproduce the chaos, please confirm:**`,
``,
`- [ ] You are running the latest version of Random World Events (visible in the mod manager)`,
`- [ ] Your issue includes the relevant \`[RWE]\` lines from \`log.txt\``,
` - Log location: \`Documents/My Games/FarmingSimulator2025/log.txt\``,
` - Search for \`[RWE]\` and paste the relevant section here`,
`- [ ] If this involves a specific event — note the event type, intensity level, and what in-game day it occurred on`,
`- [ ] You have searched [existing issues](https://github.com/${context.repo.owner}/${repoName}/issues) for a similar report`,
``,
`> **Note:** Issues without a log snippet are difficult to investigate and may be closed. Event trigger bugs especially need log data to trace the sequence.`,
].join('\n');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body
});