GitHub doesn't provide a built-in way to set due dates for issues and receive notifications before they are due. This GitHub Action aims to address that by allowing you to manage due dates for issues within a central GitHub project.
This GitHub Action allows you to manage due dates for issues in a central GitHub project. It integrates with a custom date field (due date) that you can add to your GitHub project board. By using this action to your project's issues, you can start receiving notifications:
- (n) Days before the Due Date. The number of Days before
(n)
depends on you - when the Due Date field is not provided to the project item
There are two ways to send notifications:
- With comments: Everyone which is subscribed to the issue will receive email notification when comment is placed.
- With emails: Assignees will receive email directly from the action.
To set up the custom date field (due date) in your GitHub project board:
- Go to your GitHub projects tab.
- Click on "New project" and then click "Create".
- Click on
+
icon to add new field, then click on+ New field
- Add a custom field with the name "Due Date" and the field type as "Date.", then click
Save
.
Before you can start using this GitHub Action, you'll need to ensure you have the following:
- A GitHub repository where you want to enable this action.
- A GitHub project board with a custom date field (due date) added.
- A Token (Classic) with permissions to repo:*, read:user, user:email, read:project
Input | Description |
---|---|
gh_token |
The GitHub Token |
project_number |
The project number |
notify_for |
The type of the notification (expiring_issues or missing_duedate) are about to sent. Default is expiring_issues |
duedate_field_name (optional) |
THe duedate field name. The default is Due Date |
notification_type (optional) |
The notification type. Available values are comment and email . Default is comment |
enterprise_github (optional) |
True if you are using enterprise github and false if not. Default is False |
repository_owner_type (optional) |
The type of the repository owner (oragnization or user). Default is user |
smtp_server (optional) |
The mail server address. Required only when notification_type is set to email |
smtp_port (optional) |
The mail server port. Required only when notification_type is set to email |
smtp_username (optional) |
The mail server username. Required only when notification_type is set to email |
smtp_password (optional) |
The mail server password. Required only when notification_type is set to email |
smtp_from_email (optional) |
The mail from email address. Required only when notification_type is set to email |
dry_run (optional) |
True if you want to enable dry-run mode. Default is False |
To set up due date comment notifications, you'll need to create or update a GitHub Actions workflow in your repository. Below is an example of a workflow YAML file:
name: 'Check Issues Due Date'
on:
schedule:
- cron: '0 1 * * *'
jobs:
reminder:
runs-on: ubuntu-latest
steps:
- name: Check duedate and write a comment
uses: petrandr/duedate_reminders@latest
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
project_number: 2
notify_for: "expiring_issues"
duedate_field_name: "Due Date"
notification_type: "comment"
To set up due date email notifications, you'll need to create or update a GitHub Actions workflow in your repository. Below is an example of a workflow YAML file:
name: 'Check Issues Due Date'
on:
schedule:
- cron: '0 1 * * *'
jobs:
reminder:
runs-on: ubuntu-latest
steps:
- name: Check duedate and send email to assignees
uses: petrandr/duedate_reminders@latest
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
project_number: 2
notify_for: "expiring_issues"
duedate_field_name: "Due Date"
notification_type: "email"
smtp_server: smtp.example.com
smtp_port: 587
smtp_username: ${{secrets.SMTP_USERNAME}}
smtp_password: ${{secrets.SMTP_PASSWORD}}
smtp_from_email: github@example.com
To set up comment notifications for a missing due date value, you'll need to create or update a GitHub Actions workflow in your repository. Below is an example of a workflow YAML file:
name: 'Check for missing Due Dates'
on:
schedule:
- cron: '0 1 * * *'
jobs:
reminder:
runs-on: ubuntu-latest
steps:
- name: Check for missing due dates and write a comment
uses: petrandr/duedate_reminders@latest
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
project_number: 2
notify_for: "missing_duedate"
duedate_field_name: "Due Date"
notification_type: "comment"
To set up email notifications for a missing due date value, you'll need to create or update a GitHub Actions workflow in your repository. Below is an example of a workflow YAML file:
name: 'Check for missing Due Dates'
on:
schedule:
- cron: '0 1 * * *'
jobs:
reminder:
runs-on: ubuntu-latest
steps:
- name: Check for missing due dates and send email to assignees
uses: petrandr/duedate_reminders@latest
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
project_number: 2
notify_for: "missing_duedate"
duedate_field_name: "Due Date"
notification_type: "email"
smtp_server: smtp.example.com
smtp_port: 587
smtp_username: ${{secrets.SMTP_USERNAME}}
smtp_password: ${{secrets.SMTP_PASSWORD}}
smtp_from_email: github@example.com