ci: auto label bug issues with platform (#43198)
This commit is contained in:
parent
3d766e9ccb
commit
acd39bd077
1 changed files with 23 additions and 0 deletions
23
.github/workflows/issue-opened.yml
vendored
23
.github/workflows/issue-opened.yml
vendored
|
@ -86,6 +86,29 @@ jobs:
|
|||
}
|
||||
}
|
||||
|
||||
const operatingSystems = select('heading:has(> text[value="What operating system(s) are you using?"]) + paragraph > text', tree)?.value.trim().split(', ');
|
||||
const platformLabels = new Set();
|
||||
for (const operatingSystem of (operatingSystems ?? [])) {
|
||||
switch (operatingSystem) {
|
||||
case 'Windows':
|
||||
platformLabels.add('platform/windows');
|
||||
break;
|
||||
case 'macOS':
|
||||
platformLabels.add('platform/macOS');
|
||||
break;
|
||||
case 'Ubuntu':
|
||||
case 'Other Linux':
|
||||
platformLabels.add('platform/linux');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (platformLabels.size === 3) {
|
||||
labels.push('platform/all');
|
||||
} else {
|
||||
labels.push(...platformLabels);
|
||||
}
|
||||
|
||||
const gistUrl = select('heading:has(> text[value="Testcase Gist URL"]) + paragraph > text', tree)?.value.trim();
|
||||
if (gistUrl !== undefined && gistUrl.startsWith('https://gist.github.com/')) {
|
||||
labels.push('has-repro-gist');
|
||||
|
|
Loading…
Reference in a new issue