Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
calendar

GitHub Action

Add Milestone By Due Date

v1.0.0

Add Milestone By Due Date

calendar

Add Milestone By Due Date

Add the milestone with the current or farthest due date to pull requests and issues

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Add Milestone By Due Date

uses: benelan/[email protected]

Learn more about this action in benelan/milestone-action

Choose a version

Add Milestone By Due Date

This action adds a the current milestone to an issue or pull request. It chooses the milestone that expires soonest, excluding those that already expired, based on the datetime that the action is run.

Code in Main

First, you'll need to have a reasonably modern version of node handy. This won't work with versions older than 9, for instance.

Install the dependencies

$ npm install

Build the typescript and package it for distribution

$ npm run build && npm run package

Run the tests ✔️

$ npm test

 PASS  ./index.test.js
  ✓ throws invalid number (3ms)
  ✓ wait 500 ms (504ms)
  ✓ test runs (95ms)

...