Notify slack the title of the specified repository and label issues on GAS.
Slack notification example is:
-
Deploy this
$ npm i $ npx clasp login $ npx clasp create 'GitHub Issues Notice' --rootDir ./src $ npx clasp push
-
Create google spreadsheet. For example:
Enabled Channel Time Mention Repository Label/Threshold/Message Stats Idle Period Add Relations Only P/R Label Protection Show Organization No Holiday [x] general 09
13
17@dev foo/bar
foo/bazWIP/5/There are a lot of things in progress. [x] 60 [x] [ ] [ ] [x] [ ] [x] dev 13
1750@sre foo/abc needs-review/3/@techlead Please need review.
WIP/5/Yo.[x] 45 [ ] [x] [ ] [ ] [x] [ ] ... ... ... ... ... [ ] [ ] [ ] [x] [ ] [ ] - Sheet name is
config
- Config start 2nd row, 1st row is subject
- Sheet name is
-
Set script properties as ENV(File > Project properties > Script properties)
- SLACK_ACCESS_TOKEN
- GITHUB_ACCESS_TOKEN
- SHEET_ID
- GITHUB_API_ENDPOINT(optional)
-
Add project trigger(Edit > Current project's triggers > Add trigger)
- Choose which function to run:
notify
- Which run at deployment:
head
- Select event source:
Time-driven
- Select type of time based trigger:
Minute timer
- Select hour interval:
Every minute
- Choose which function to run:
Stats reports issues total count, pull-requests total count and reactive percent.
Reactive percent derives from proactive
labeled issues and other issues count.
If no proactive labels, no reports.
By attaching proactive
label to issues, it will be visible whether the work of
the team is healthy.
If there is a number of days in the Idle period, it will be automatically closed if there are no issues or pulls that have not been updated over that number of days. If you do not want to use this function, please set it to blank or 0.
Add relationship to notifications to Slack. Specifically, include assignees and reviewers. If you use this option, you should set code review assignments on Github.
The target of monitoring is only pull requests other than draft.
Closed Issue is also monitored for Issue label. This will notify you of any issues that have been accidentally closed.
Add organization name to the display If you want to notify multiple organizations.
This notification usually does not notify you on holidays. Use this option to run it regardless of holidays.
- Fork (https://github.com/linyows/github-issues-notice/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
npm ci
command and confirm that it passes - Create a new Pull Request