Skip to content

Commit

Permalink
Merge branch 'master' into 1.21-neoforge
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Nov 15, 2024
2 parents 0be4385 + cec6e3a commit cefc00a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ task github {
}

import java.time.LocalDate
import org.kohsuke.github.GHIssueState
import org.kohsuke.github.GHMilestoneState
import java.time.ZoneId

Expand All @@ -334,9 +335,10 @@ task closeMilestone {
def ghVersion = "v" + version.substring(0, version.indexOf("-MC"))
def versionSlug = ghVersion.substring(1).replace('.', '-')

def milestone = repository.listMilestones(GHMilestoneState.ALL).find { it.title == ghVersion }
// Weird API design: listMilestones() requires GHIssueState while everything else uses GHMilestoneState.
def milestone = repository.listMilestones(GHIssueState.ALL).find { it.title == ghVersion }
if (milestone == null) {
milestone = repository.createMilestone(ghVersion, null)
milestone = repository.createMilestone(ghVersion, "")
}

if (milestone.getState() != GHMilestoneState.CLOSED) {
Expand Down

0 comments on commit cefc00a

Please sign in to comment.