This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
forked from chrullrich/vcpkg-local
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.93 KB
/
check_issues.yml
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
name: Check For Common Issues
on:
issues:
types:
- opened
jobs:
check-for-common-issues:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@v6
with:
script: |
let issue_query = {
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo
};
let issue = await github.rest.issues.get(issue_query)
// missing-windows-sdk-issue
let reg = /RC Pass 1: command "rc .*" failed \(exit code 0\) with the following output:/;
if (reg.test(issue.data.body)){
await github.rest.issues.removeAllLabels(issue_query);
await github.rest.issues.setLabels({...issue_query, labels: ["category:question"]});
let body = "Thanks for posting this issue. Please make sure you have the following installed.\n" +
"- Visual Studio Desktop development with C++.\n" +
"- Windows 10 SDK or Windows 11 SDK.";
await github.rest.issues.createComment({...issue_query, body});
// Close the issue?
}
// msys2 download fails => old vcpkg version
reg = /error: https:\/\/repo\.msys2\.org\/.*: failed: status code 404/;
if (reg.test(issue.data.body)){
await github.rest.issues.removeAllLabels(issue_query);
await github.rest.issues.setLabels({...issue_query, labels: ["category:question"]});
let body = "Try updating your vcpkg version via `git pull` to resolve this issue. MSYS2 downloads are removed from the upstream servers from time to time, so using an up-to-date vcpkg version is necessary."
await github.rest.issues.createComment({...issue_query, body});
// Close the issue?
}