diff --git a/README.md b/README.md index 73cde98e..3e397185 100755 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ jobs: memorable-milestones: runs-on: ubuntu-latest steps: - - uses: instantish/memorable-milestones@2.0.0 + - uses: instantish/memorable-milestones@2.0.1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} ``` diff --git a/dist/index.js b/dist/index.js index b59b2609..994e5085 100644 --- a/dist/index.js +++ b/dist/index.js @@ -140,6 +140,11 @@ class MilestoneProcessor { core.info(`Skipping closing ${title} because it has open issues/prs`); return; } + const dueOn = milestone.due_on && moment_1.default(milestone.due_on); + if (dueOn && dueOn.isAfter(this.now)) { + core.info(`Skipping closing ${title} because it is in the future`); + return; + } // Close instantly because there isn't a good way to tag milestones // and do another pass. return yield this.closeMilestone(milestone); diff --git a/package.json b/package.json index 4ca5dc86..77068071 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "memorable-milestones", - "version": "2.0.0", + "version": "2.0.1", "private": true, "description": "Puts milestones on auto-pilot with memorable emoji names", "main": "lib/main.js",