2023-04-11 22:55:44 +02:00
name : Check For Common Issues
on :
issues :
types :
- opened
jobs :
2023-06-28 10:13:10 +02:00
check-for-common-issues :
2023-04-11 22:55:44 +02:00
runs-on : ubuntu-latest
permissions :
issues : write
steps :
2024-02-01 23:59:24 +01:00
- uses : actions/github-script@v7
2023-04-11 22:55:44 +02:00
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)
2023-06-28 10:13:10 +02:00
// missing-windows-sdk-issue
2023-04-11 22:55:44 +02:00
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?
}
2023-06-28 10:13:10 +02:00
// 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?
}