-
Notifications
You must be signed in to change notification settings - Fork 915
Add Workers Builds Notifications template #873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Workers Builds Notifications template #873
Conversation
| # Cloudflare API token | ||
| # Create at: https://dash.cloudflare.com/profile/api-tokens | ||
| # Select: | ||
| # - **Edit Cloudflare Workers** template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually need all of the permissions that this grants? Ex: write permissions
(going through setting this up now - I like the guidance in comments)
|
|
||
| > **Important:** The queue must be created before deploying the worker. | ||
|
|
||
| ### 1. Create a Queue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mia303 @jonesphillip if Queues was one of the things that "just worked" like R2/KV/D1:
https://developers.cloudflare.com/changelog/2025-10-24-automatic-resource-provisioning/
Then you could just run wrangler deploy or have this just work with Deploy to Cloudflare.
Today given:
"queues": {
"consumers": [
{
"queue": "builds-event-subscriptions",
"max_batch_size": 10,
"max_batch_timeout": 30,
"max_retries": 3
}
]
}You'll get:
✘ [ERROR] Queue "builds-event-subscriptions" does not exist. To create it, run: wrangler queues create builds-event-subscriptions
But seems entirely feasible to just go create the queue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| ```bash | ||
| wrangler queues subscription create builds-event-subscriptions \ | ||
| --source workers-builds \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| --source workers-builds \ | |
| --source workersBuilds.worker \ |
| ```bash | ||
| wrangler queues subscription create builds-event-subscriptions \ | ||
| --source workers-builds \ | ||
| --events build.started,build.succeeded,build.failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need Worker name?
✘ [ERROR] --worker-name is required when using source 'workersBuilds.worker'
|
Take a look at: https://github.com/cloudflare/templates/compare/main...irvinebroque:templates:bib/cleanup-notifications?expand=1 Think with bit more we can present these notifications in a way where your eye goes to the right place and it's intuitive:
^ very quick and not perfect And think about designing future of what we want a more first-class built in feature to be — what content should get sent to Slack, how should it get presented etc. |
6658fc9 to
37fabec
Compare
- Add @cloudflare/vitest-pool-workers for proper Workers runtime testing - Refactor src/index.ts to export testable helper functions - Rewrite tests with 34 comprehensive unit and integration tests - Add test/env.d.ts for cloudflare:test type augmentation - Update tsconfig.json to include test files and proper types - Configure vitest.config.ts for queue consumer testing - Add upload_source_maps to wrangler.jsonc - Update README with detailed setup instructions - Add preview_image_url for templates gallery
37fabec to
8d84a2e
Compare
Reverts accidental whitespace changes (tabs to spaces) that were introduced during the rebase onto main.
|
|
Preview link not generated: you must be on a branch, not on a fork. |
Changed from /queues/configuration/event-subscriptions/ to /queues/event-subscriptions/


Summary
Adds a template for receiving Workers Builds notifications via Slack, Discord, or any webhook using Queue Event Subscriptions.
Features
Preview Image
Included at
workers-builds-notifications-template/preview.png— please upload and provide thepreview_image_urlfor package.json.Checklist
-templatepackage.jsonis populated<!-- dash-content-start -->and<!-- dash-content-end -->to designate the Dash readme preview.gitignorefile existspackage.jsoncontains adeploycommandpackage.jsoncontainsprivate: trueand noversionfield