Skip to content

Commit 428bf73

Browse files
committed
npm run prepare
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 62c9ca2 commit 428bf73

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

dist/index.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38299,8 +38299,9 @@ const run = async () => {
3829938299
const createdIssues = []
3830038300

3830138301
// Iterate
38302+
let counter = 0
3830238303
for (const item of feed.items) {
38303-
let title = `${issueTitlePrefix}${item.title}`
38304+
const title = `${issueTitlePrefix}${item.title}`
3830438305
if (titlePattern && !title.match(titlePattern)) {
3830538306
core.debug(`Feed item skipped because it does not match the title pattern (${title})`)
3830638307
continue
@@ -38342,11 +38343,19 @@ const run = async () => {
3834238343
// Create Issue
3834338344
createdIssues.push({ title, body, labels })
3834438345
} else {
38345-
title = `${issueTitlePrefix}${new Date().toTimeString()}`
38346-
createdIssues[0].title = title
38346+
if (counter === 1) {
38347+
// The title of aggregated items will be "<n>new items";
38348+
// Add the title to the body so that it does not go poof
38349+
createdIssues[0].body = `# ${createdIssues[0].title}\n\n${createdIssues[0].body}`
38350+
}
3834738351

38348-
createdIssues[0].body += `\n\n${body}`
38352+
createdIssues[0].body += `\n\n# ${title}\n\n${body}`
3834938353
}
38354+
counter++
38355+
}
38356+
38357+
if (aggregate && counter > 1) {
38358+
createdIssues[0].title = `${issueTitlePrefix}${counter} new items`
3835038359
}
3835138360

3835238361
for (const issue of createdIssues) {

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)