Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
makubacki committed Jan 15, 2025
1 parent 29b1908 commit 343aab9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ jobs:
});
const issueLines = issue.data.body.split('\n');
const packagesLine = issueLines.find(line => line.includes('packages_impacted'));
const packagesImpacted = packagesLine.split(': ')[1].trim();
const packagesToPrepend = packagesImpacted.split(',').map(pkg => `[${pkg.trim()}]`).join(' ')
const newTitle = `${packagesToPrepend} - ${issue.data.title}`;
const packageLineIndex = issueLines.findIndex(line => line.includes('What packages are impacted?'));
if (packageLineIndex === -1) {
process.exit(0);
}
const packagesImpacted = issueLines[packageLineIndex + 2] : '';
const packagesToAppend = packagesImpacted.split(',').map(pkg => `[${pkg.trim()}]`).join(' ');
const newTitle = `${issue.data.title} - ${packagesToAppend}`;
await github.rest.issues.update({
owner: context.repo.owner,
Expand Down

0 comments on commit 343aab9

Please sign in to comment.