| 154 | } |
| 155 | |
| 156 | async function contributors(from: string, to: string) { |
| 157 | const base = ref(from) |
| 158 | const head = ref(to) |
| 159 | |
| 160 | const users: User = new Map() |
| 161 | for (const item of await diff(base, head)) { |
| 162 | const title = item.message.split("\n")[0] ?? "" |
| 163 | if (!item.login || team.includes(item.login)) continue |
| 164 | if (title.match(/^(ignore:|test:|chore:|ci:|release:)/i)) continue |
| 165 | if (!users.has(item.login)) users.set(item.login, new Set()) |
| 166 | users.get(item.login)!.add(title) |
| 167 | } |
| 168 | |
| 169 | return users |
| 170 | } |
| 171 | |
| 172 | async function published(to: string) { |
| 173 | if (to === "HEAD") return |