-
Notifications
You must be signed in to change notification settings - Fork 66
29 lines (27 loc) · 1.01 KB
/
issue-attachments.yaml
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
name: Attachment Reminder
on:
issues:
types: [opened]
jobs:
remind:
runs-on: ubuntu-latest
steps:
- name: Check issue for attachments
uses: actions/github-script@v7
with:
script: |
const github = require('@actions/github');
const octokit = github.getOctokit();
const issue = await octokit.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
if (!issue.data.attachments.length) {
await octokit.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: 'Please provide a screenshot of the in-app state and/or a copy of your local-rag.log file to help debug this issue. For more information, please checkout the [Troubleshooting Guide](docs/troubleshooting.md).'
});
}