Skip to content

Commit e15e714

Browse files
committed
npm run prepare
Signed-off-by: Matthias Aßhauer <mha1993@live.de>
1 parent dfeaa75 commit e15e714

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

dist/index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38259,7 +38259,8 @@ const parseDurationInMilliseconds = (text) => {
3825938259

3826038260
const run = async () => {
3826138261
try {
38262-
const issueTitlePrefix = core.getInput('prefix')
38262+
let issueTitlePrefix = core.getInput('prefix')
38263+
issueTitlePrefix = issueTitlePrefix ? issueTitlePrefix + ' ' : ''
3826338264
let dryRun = core.getInput('dry-run')
3826438265
if (dryRun) dryRun = dryRun === 'true'
3826538266
let aggregate = core.getInput('aggregate')
@@ -38299,7 +38300,7 @@ const run = async () => {
3829938300

3830038301
// Iterate
3830138302
for (const item of feed.items) {
38302-
let title = `${issueTitlePrefix ? issueTitlePrefix + ' ' : ''}${item.title}`
38303+
let title = `${issueTitlePrefix}${item.title}`
3830338304
if (titlePattern && !title.match(titlePattern)) {
3830438305
core.debug(`Feed item skipped because it does not match the title pattern (${title})`)
3830538306
continue
@@ -38312,6 +38313,11 @@ const run = async () => {
3831238313
continue
3831338314
}
3831438315

38316+
if (aggregate && issues.find(x => x.title.startsWith(issueTitlePrefix) && Date.parse(x.created_at) > Date.parse(item.isoDate))) {
38317+
core.warning('Newer issue with same prefix already exists')
38318+
continue
38319+
}
38320+
3831538321
// Issue Content
3831638322
const content = item.content || item.description || ''
3831738323

@@ -38336,7 +38342,7 @@ const run = async () => {
3833638342
// Create Issue
3833738343
createdIssues.push({ title, body, labels })
3833838344
} else {
38339-
title = `${issueTitlePrefix ? issueTitlePrefix + ' ' : ''}${new Date().toTimeString()}`
38345+
title = `${issueTitlePrefix}${new Date().toTimeString()}`
3834038346
createdIssues[0].title = title
3834138347

3834238348
createdIssues[0].body += `\n\n${body}`

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)