(github: Octokit)
| 53 | } |
| 54 | |
| 55 | async function getCommitsFromProject(github: Octokit): Promise<CardCommit[]> { |
| 56 | const cards = await github.rest.projects.listCards({ |
| 57 | column_id: TO_BE_RELEASED_COLUMN_ID |
| 58 | }); |
| 59 | |
| 60 | const commits = await Promise.all( |
| 61 | cards.data.filter(isIssueCard).map(async (card: Card) => ({ |
| 62 | card, |
| 63 | commit: await cardToMergedCommit(github, card) |
| 64 | })) |
| 65 | ); |
| 66 | |
| 67 | const filtered = commits.filter(({ commit }) => |
| 68 | Boolean(commit) |
| 69 | ) as CardCommit[]; |
| 70 | |
| 71 | return filtered.sort(sortCommits); |
| 72 | } |
| 73 | |
| 74 | function isIssueCard(card: Card) { |
| 75 | return card.content_url?.includes('/issues/'); |
no test coverage detected