(options: WeeklyOptions, commits: WeeklyCommit[])
| 206 | } |
| 207 | |
| 208 | export function createWeeklyDraft(options: WeeklyOptions, commits: WeeklyCommit[]): WeeklyDraft { |
| 209 | const range = formatDateRange(options.from, options.to); |
| 210 | const highlights = selectHighlights(commits); |
| 211 | |
| 212 | return { |
| 213 | docsUpdate: renderDocsUpdate(options, range, commits, highlights), |
| 214 | weeklyNotes: renderWeeklyNotes(options, range, commits, highlights), |
| 215 | discordDraft: renderDiscordDraft(range, highlights), |
| 216 | xDraft: renderXDraft(range, highlights), |
| 217 | }; |
| 218 | } |
| 219 | |
| 220 | function outputWeeklyDraft(options: WeeklyOptions, draft: WeeklyDraft) { |
| 221 | if (!options.write) { |
no test coverage detected