File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,13 @@ const isValidVersion = (version: string) => {
75
75
}
76
76
77
77
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
+ ] ;
79
85
return allMilestones . filter ( milestone => {
80
86
if ( ! isValidVersion ( milestone . title ) ) {
81
87
throw Error ( `Non-semantic-versioned milestone title: ${ milestone . title } has been detected.` ) ;
You can’t perform that action at this time.
0 commit comments