Skip to content

Conversation

@yomna-shousha
Copy link
Contributor

Summary

  • Replace legacy Slack attachments with Block Kit format for cleaner notifications
  • Add smart error extraction for failed builds (shows first error, not last)
  • Add GitHub/GitLab commit links in notifications
  • Skip started/queued events (ack without notification)
  • Fix API token permissions docs (Workers Builds Configuration: Read, Workers Scripts: Read)
  • Fix CLI subscription command (--source workersBuilds.worker, --worker-name flag)
  • Rewrite tests with 26 comprehensive test cases
  • Update preview image

Changes

File Description
src/index.ts New Block Kit formatting, smart error extraction, commit URLs
test/index.spec.ts Complete rewrite with 26 tests including pagination, fallback handling
README.md Fixed CLI command, permissions, features, troubleshooting
.dev.vars.example Removed placeholder values, correct token permissions
preview.png Updated preview image

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

Preview link not generated: you must be on a branch, not on a fork.
Collaborators may enable previews for this pull request by attaching the allow preview label.
If you are already a collaborator, please create a branch rather than forking.

- Add @slack/types for proper Block Kit typing instead of custom types
- Fix author extraction edge case when name starts with @
- Add getBuildStatus helper to eliminate duplicated status logic
- Add pagination safeguard (MAX_LOG_PAGES) to prevent infinite loops
- Fix landing page to accurately reflect event behavior
- Reduce test suite from 62 to 15 focused tests
- Export helper functions for testability
Split src/index.ts (576 lines) into focused modules:
- src/index.ts (79 lines) - Main queue handler
- src/types.ts (88 lines) - Type definitions
- src/api.ts (125 lines) - Cloudflare API calls
- src/helpers.ts (196 lines) - Utility functions
- src/slack.ts (246 lines) - Slack formatting and sending

This makes the codebase easier to navigate and understand.
@deloreyj deloreyj force-pushed the yomna/cleanup-notifications-template branch from 5024e61 to a034036 Compare January 9, 2026 10:49
@deloreyj deloreyj force-pushed the yomna/cleanup-notifications-template branch from a034036 to 3fec2a9 Compare January 9, 2026 10:53
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

template name version latestVersion isDevDependency
workers-builds-notifications-template @cloudflare/vitest-pool-workers ^0.11.1 0.12.1 true
workers-builds-notifications-template @cloudflare/workers-types ^4.20241230.0 4.20260109.0 true
workers-builds-notifications-template @slack/types ^2.19.0 2.19.0 true
workers-builds-notifications-template typescript ^5.5.2 5.9.3 true
workers-builds-notifications-template vitest ~3.0.0 4.0.16 true
workers-builds-notifications-template wrangler ^4.45.0 4.58.0 true

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Preview link not generated: you must be on a branch, not on a fork.
Collaborators may enable previews for this pull request by attaching the allow preview label.
If you are already a collaborator, please create a branch rather than forking.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Preview link not generated: you must be on a branch, not on a fork.
Collaborators may enable previews for this pull request by attaching the allow preview label.
If you are already a collaborator, please create a branch rather than forking.

@deloreyj deloreyj merged commit 97c25e5 into cloudflare:main Jan 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants