File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -87,11 +87,15 @@ const run = async () => {
87
87
// Iterate
88
88
let counter = 0
89
89
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 && (titlePattern || !item.pubDate)) {
91
+ core.debug(`Feed item ${JSON.stringify(item)} skipped because it has no title`)
93
92
continue
94
93
}
94
+ if (titlePattern && !item.title.match(titlePattern)) {
95
+ core.debug(`Feed item skipped because it does not match the title pattern (${item.title})`)
96
+ continue
97
+ }
98
+ const title = `${issueTitlePrefix}${item.title || new Date(item.pubDate).toUTCString()}`
95
99
96
100
core.debug(`Issue '${title}'`)
97
101
You can’t perform that action at this time.
0 commit comments