Skip to content

Commit

Permalink
Check for failed msys2 downloads in issues (microsoft#31991)
Browse files Browse the repository at this point in the history
* Check for failed msys2 downloads

* Trigger Build
  • Loading branch information
autoantwort authored Jun 28, 2023
1 parent 4e06e78 commit 4a10359
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/check_issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- opened

jobs:
missing-windows-sdk-issue:
check-for-common-issues:
runs-on: ubuntu-latest
permissions:
issues: write
Expand All @@ -20,6 +20,8 @@ jobs:
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);
Expand All @@ -30,3 +32,13 @@ jobs:
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?
}

0 comments on commit 4a10359

Please sign in to comment.