-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added additional project structure to the v1 starter template
- Loading branch information
1 parent
70cd3d0
commit 4b93fb3
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
deploy/project_template/v1/flows/hello_world/hello.work.js
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { | ||
hiphops, | ||
notify, | ||
} from "https://deno.land/x/hiphops@2407-cromulent-fox/mod.ts"; | ||
|
||
hiphops.run(async ({ data }) => { | ||
// The notify service is built into hiphops.io, no integration required | ||
await notify.sendEmail({ | ||
// Recipient addresses need to be added to your account's allow list before you | ||
// can send. | ||
to: ["[email protected]"], | ||
// In this case, data is the raw pull_request event from GitHub (plus the `hops` metadata) | ||
// GitHub's own docs describe the exact structure of events | ||
content: `PR ${data["number"]} was merged!`, | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Hops files use an HCL based DSL (similar to Terraform, Docker Bake, and other tools) | ||
// These files are where you match inbound events to workers | ||
// create schedules, and define custom commands | ||
|
||
// Example of triggering a worker on a pullrequest merged event (e.g. from github) | ||
// `pullrequest` is the event, `merged` is the event action. | ||
// `notify_prs` is the name you've given to the flow | ||
on pullrequest_merged notify_prs { | ||
// Will trigger the worker code in `hello.work.js` (or hello.work.ts if you prefer) | ||
worker = "hello" | ||
} | ||
|
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