Skip to content

Commit 2aac630

Browse files
authored
feat: Add support for schedule trigger (#12)
Enables using `schedule` event
1 parent 645a8ba commit 2aac630

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ We currently support:
1111
- `pull_request`
1212
- `release`
1313
- `push` (tags, commits)
14+
- `schedule`
1415

1516
## Messages
1617

@@ -58,6 +59,10 @@ All event messages will have these elements:
5859
1. Commit Hash - Also a link showing combined changes of all commits for the push
5960
2. Head Commit name - Name of last commit in the batch (can push multiple commits). Also a link to that commit.
6061

62+
### Schedule
63+
64+
![Schedule](https://user-images.githubusercontent.com/5962998/100387966-baad0800-2fff-11eb-8733-56c4400286fa.png)
65+
6166
## Usage
6267

6368
You can use this action after any other action, however I recommend you put it as the last one. Here is an example setup of this action for a pull request:

dist/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12839,6 +12839,11 @@ const getMessage = () => {
1283912839
return `Workflow <${runUrl}|${process.env.GITHUB_WORKFLOW}> (<${github.context.payload.compare}|${commitId}>) for Commit <${headCommit.url}| ${headCommit.title}>`;
1284012840
}
1284112841

12842+
case 'schedule':
12843+
{
12844+
return `Scheduled Workflow <${runUrl}|${process.env.GITHUB_WORKFLOW}>`;
12845+
}
12846+
1284212847
default:
1284312848
return null;
1284412849
}

src/notify.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ const getMessage = () => {
8383
return `Workflow <${runUrl}|${process.env.GITHUB_WORKFLOW}> (<${context.payload.compare}|${commitId}>) for Commit <${headCommit.url}| ${headCommit.title}>`;
8484
}
8585

86+
case 'schedule': {
87+
return `Scheduled Workflow <${runUrl}|${process.env.GITHUB_WORKFLOW}>`;
88+
}
89+
8690
default:
8791
return null;
8892
}

0 commit comments

Comments
 (0)