Skip to content

Commit 887a5b1

Browse files
Explicitly fetch open and closed milestones separately
1 parent 7755c4e commit 887a5b1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dev-tools/src/create-change-log.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,13 @@ const isValidVersion = (version: string) => {
7575
}
7676

7777
const fetchMilestonesInNewerOrderUpTo = async (latestVersion: string) => {
78-
const allMilestones = await githubFetch<Milestone[]>("https://api.github.com/repos/kyuridenamida/atcoder-tools/milestones?state=open,closed");
78+
// Explicitly fetch open and closed milestones separately because if we specify "?state=open,closed" together,
79+
// sometimes a new mile stone is missing.
80+
const allMilestones =
81+
[
82+
...await githubFetch<Milestone[]>("https://api.github.com/repos/kyuridenamida/atcoder-tools/milestones?state=open"),
83+
...await githubFetch<Milestone[]>("https://api.github.com/repos/kyuridenamida/atcoder-tools/milestones?state=closed");
84+
];
7985
return allMilestones.filter(milestone => {
8086
if (!isValidVersion(milestone.title)) {
8187
throw Error(`Non-semantic-versioned milestone title: ${milestone.title} has been detected.`);

0 commit comments

Comments
 (0)