File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -87,11 +87,16 @@ const run = async () => {
8787 // Iterate
8888 let counter = 0
8989 for (const item of feed.items) {
90- const title = `${issueTitlePrefix}${ item.title || ( item.pubDate && new Date(item.pubDate).toUTCString())}`
91- if (titlePattern && !title.match(titlePattern) ) {
92- core.debug(`Feed item skipped because it does not match the title pattern (${title}) `)
90+ if (! item.title && item.pubDate) item.title = new Date(item.pubDate).toUTCString()
91+ if (!item.title ) {
92+ core.debug(`Feed item ${JSON.stringify(item)} skipped because it has no title`)
9393 continue
9494 }
95+ if (titlePattern && !item.title.match(titlePattern)) {
96+ core.debug(`Feed item skipped because it does not match the title pattern (${item.title})`)
97+ continue
98+ }
99+ const title = `${issueTitlePrefix}${item.title}`
95100
96101 core.debug(`Issue '${title}'`)
97102
You can’t perform that action at this time.
0 commit comments