Skip to content

Commit

Permalink
ci: auto label bug issues with platform (electron#43198)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 authored Aug 5, 2024
1 parent 3d766e9 commit acd39bd
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/issue-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit acd39bd

Please sign in to comment.