(from: string, to: string, reuse: boolean)
| 181 | } |
| 182 | |
| 183 | async function thanks(from: string, to: string, reuse: boolean) { |
| 184 | const release = reuse ? await published(to) : undefined |
| 185 | if (release) return release.split(/\r?\n/) |
| 186 | |
| 187 | const users = await contributors(from, to) |
| 188 | if (users.size === 0) return [] |
| 189 | |
| 190 | const lines = [`**Thank you to ${users.size} community contributor${users.size > 1 ? "s" : ""}:**`] |
| 191 | for (const [name, commits] of users) { |
| 192 | lines.push(`- @${name}:`) |
| 193 | for (const commit of commits) lines.push(` - ${commit}`) |
| 194 | } |
| 195 | return lines |
| 196 | } |
| 197 | |
| 198 | function format(from: string, to: string, list: Commit[], thanks: string[]) { |
| 199 | const grouped = new Map<string, Map<string, string[]>>() |
no test coverage detected