forked from alexleventer/github-issue-due-dates-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow custom interval checks and labels
- Loading branch information
1 parent
919aa0c
commit a35623d
Showing
8 changed files
with
106 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# :calendar: GitHub Issue Due Dates Action | ||
Add due dates to GitHub issues - issues are automatically tagged with `Overdue` and `Due in 1 week` labels. | ||
Add due dates to GitHub issues - issues are automatically tagged with labels | ||
when they pass certain date thresholds, as defined by you. | ||
|
||
## How it works: | ||
1. Add the following snippet to the top of issues you'd like to assign due dates to: | ||
|
@@ -9,7 +10,7 @@ due: 2019-09-19 | |
--- | ||
``` | ||
2. Create a `.github/workflows/workflow.yml` file with the following contents: | ||
``` | ||
```yaml | ||
name: Main Workflow | ||
on: | ||
schedule: | ||
|
@@ -23,6 +24,31 @@ jobs: | |
uses: alexleventer/[email protected] | ||
with: | ||
GH_TOKEN: "${{ secrets.GH_TOKEN }}" | ||
OVERDUE_LABEL: OVERDUE! | ||
INTERVALS: >- | ||
- days: 30 | ||
label: Due in 1 month | ||
- days: 14 | ||
label: Due in 2 weeks | ||
- days: 7 | ||
label: Due in 1 week | ||
- days: 1 | ||
label: DUE TOMORROW | ||
``` | ||
3. Generate a [personal access GitHub token](https://github.com/settings/tokens). | ||
4. Add the following environment variable to your repository secrets: `GH_TOKEN={{your personal access token}}`. | ||
4. Add the following environment variable to your repository | ||
secrets: `GH_TOKEN={{your personal access token}}`. | ||
|
||
## Defining intervals | ||
|
||
Intervals are defined as a sequence (list) with a number of `days` and | ||
a `label` to be set. | ||
|
||
You can define intervals and labels to meet your requirements; the | ||
above is simply a guide. | ||
|
||
### Note the block syntax | ||
|
||
The value of the `INTERVALS` key must be interpreted as a string, | ||
and must be a valid YAML block. Your action will fail if you do not | ||
set the block indicator. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters