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.3.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

milestone-action status

Add Milestone By Due Date

This Action adds the current milestone or the milestone with the farthest due date to issues and pull requests. The Action ignores milestones with no due date and milestones that are past due. Here are successful test runs for current and farthest due milestones.

Usage

# .github/workflows/add-milestone.yml
name: Add Milestone
on:
  issues:
    types: [opened]
    branches: [master]
  pull_request:
    types: [closed]
    branches: [master]
jobs:
  add:
    runs-on: ubuntu-latest
    steps:
      - uses: benelan/[email protected]
        with:
          farthest: true # remove this line to add the current milestone
          overwrite: true # remove this line to keep an existing milestone

Changelog

1.3.0 (2022-04-26)

Features

  • Add option to overwrite an existing milestone (7ad020e)

Fixes

  • Use UTC time for the current date (7ad020e)

1.2.0 (2022-04-25)

Features

  • Allow the workflow to run on any event action (9bce688)

1.1.1 (2021-09-21)

Fixes

  • skip action when the sender is dependabot, read this blog post for more info (e0a0717)

1.1.0 (2021-09-13)

Features

  • add option to use the milestone with the farthest due date (9ac638a)