Skip to content

Commit

Permalink
Merge pull request #50 from pieces-app/49-tesitng
Browse files Browse the repository at this point in the history
Added support for multi-select software
  • Loading branch information
shivay-at-pieces authored Jan 18, 2024
2 parents be1ae2c + 76c98ba commit a3749e0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/labeler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@ async function run() {

const labels = [];

let software;
if (issueBodyLines[0] === '### Software') software = issueBodyLines[2].toLowerCase();
if (software) labels.push(`app:${software}`);
// let software;
// if (issueBodyLines[0] === '### Software') software = issueBodyLines[2].toLowerCase();
// if (software) labels.push(`app:${software}`);

// Handle multiple software choices
if (issueBodyLines[0] === '### Software') {
const softwareChoices = issueBodyLines[2].split(', ').map(s => s.toLowerCase());
softwareChoices.forEach(software => {
if (software) labels.push(`app:${software}`);
});
}

let os;
if (issueBodyLines[4] === '### Operating System') os = issueBodyLines[6].toLowerCase();
Expand All @@ -30,4 +38,4 @@ async function run() {
});
}

run().catch(err => console.error(err));
run().catch(err => console.error(err));

0 comments on commit a3749e0

Please sign in to comment.