Skip to content

feat: migrate Newsletter Service#3505

Merged
asyncapi-bot merged 19 commits intoasyncapi:masterfrom
princerajpoot20:phase1_migration
Apr 25, 2026
Merged

feat: migrate Newsletter Service#3505
asyncapi-bot merged 19 commits intoasyncapi:masterfrom
princerajpoot20:phase1_migration

Conversation

@princerajpoot20
Copy link
Copy Markdown
Member

@princerajpoot20 princerajpoot20 commented Apr 4, 2026

Related #2223 asyncapi/website#5127
Related PRs: asyncapi/.github#396 asyncapi/website#5292

Things need to be done before merge

  • Add the env secret. Key: KIT_API_KEY (I will help with this)
  • Add the env secret. Key: KIT_MEETINGS_TAG_ID (Id: 18208677, this is from my personal Kit account. it will be replaced with the actual one once we have an official account.)

Testing Evidence

image
  • Meeting scheduled for the correct tag ID (“Meeting”)
image
  • Meeting mail looks good
image

Summary by CodeRabbit

  • Chores
    • Migrated newsletter delivery from Mailchimp to Kit.com and updated automation to use the new provider.
    • Updated newsletter template: fixed subject line, removed preview-text markup, improved greeting personalization, and revised closing to "Cheers, AsyncAPI Initiative."
    • Upgraded GitHub Actions workflow and related automation steps to newer action versions and Node runtime for improved reliability.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 4, 2026

📝 Walkthrough

Walkthrough

Replaces Mailchimp-based newsletter delivery with a Kit.com integration: removes Mailchimp module and dependency, adds a Kit broadcast helper and updated HTML template, and updates the GitHub Actions workflow to invoke the new Kit helper and use updated action versions and secrets.

Changes

Cohort / File(s) Summary
Mailchimp removal
/.github/workflows/create-event-helpers/mailchimp/index.js, /.github/workflows/create-event-helpers/package.json
Deleted the Mailchimp campaign module and removed the @mailchimp/mailchimp_marketing dependency.
Kit.com integration
/.github/workflows/create-event-helpers/kit/index.js
Added new async helper that lists events, validates KIT_API_KEY and KIT_MEETINGS_TAG_ID, computes next-day 11:00:00.000 UTC send_at, builds content via htmlContent(events), and POSTs a broadcast to https://api.kit.com/v4/broadcasts with auth, subscriber_filter and error handling.
Email template updates
/.github/workflows/create-event-helpers/kit/htmlContent.js
Replaced Mailchimp-specific merge fields/preview markup with generic template expressions (subscriber.first_name), set a fixed subject/title, removed Mailchimp unsubscribe/update links and adjusted greeting/signature copy.
Workflow configuration
/.github/workflows/send-events-newsletter.yml
Bumped action versions (actions/checkout@v2→@v4, actions/setup-node@v2→@v4, actions/github-script@v4→@v7), moved Node runtime 16→20, swapped Mailchimp step for Kit step, removed MAILCHIMP_API_KEY, and added KIT_API_KEY and KIT_MEETINGS_TAG_ID.

Sequence Diagram(s)

sequenceDiagram
    actor GHA as GitHub Actions
    participant Loader as Event Loader
    participant KitHelper as Kit Helper
    participant KitAPI as Kit.com API

    GHA->>Loader: listEvents()
    Loader-->>GHA: events[]
    alt no events
        GHA->>GHA: Log "no events" and exit
    else events found
        GHA->>KitHelper: invoke helper with events
        KitHelper->>KitHelper: validate KIT_API_KEY & KIT_MEETINGS_TAG_ID
        KitHelper->>KitHelper: compute send_at (next day 11:00 UTC)
        KitHelper->>KitHelper: build HTML content from events
        KitHelper->>KitAPI: POST /v4/broadcasts (X-Kit-Api-Key, payload)
        KitAPI-->>KitHelper: 2xx / error response
        alt success
            KitHelper->>GHA: Log scheduled
        else failure
            KitHelper->>GHA: core.setFailed(error)
        end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I swapped the old merge fields for a cleaner Kit tune,
Packed events at eleven, beneath a bright send-at moon.
No unsubscribe tags, just a friendly cheer,
Broadcasts hop out tomorrow — recipients near and dear.
🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: migrate Newsletter Service' clearly summarizes the main change: migrating the email newsletter system from Mailchimp to Kit.com.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/send-events-newsletter.yml (1)

19-19: Consider upgrading Node.js version.

Node.js 16 reached end-of-life in September 2023 and no longer receives security updates. Consider upgrading to Node.js 20 (LTS) for continued support and security patches.

⬆️ Proposed fix
         with:
-          node-version: 16
+          node-version: 20
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/send-events-newsletter.yml at line 19, The workflow
currently pins the runner's Node version using the YAML key node-version: 16;
update that value to the current LTS (node-version: 20) to restore security
patches and support, then run CI locally or via the workflow to confirm no
breaking changes; also search for other references to node-version: 16 (e.g., in
job matrices or setup-node steps) and update them and any docs or action inputs
that mention Node 16.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/create-event-helpers/kit/index.js:
- Around line 10-11: The code currently assigns MEETINGS_TAG_ID =
Number(process.env.KIT_MEETINGS_TAG_ID) and uses KIT_API_KEY without checks; add
explicit validation at module startup to ensure process.env.KIT_MEETINGS_TAG_ID
exists and parses to a finite number (otherwise throw/exit with a clear message)
and ensure process.env.KIT_API_KEY is present (otherwise throw/exit with a clear
message); reference the constants KIT_BASE, MEETINGS_TAG_ID and the environment
variables KIT_MEETINGS_TAG_ID and KIT_API_KEY when implementing the checks so
failures are descriptive and prevent silent NaNs or unauthenticated calls.

In @.github/workflows/send-events-newsletter.yml:
- Line 26: Update the GitHub Actions step that references the action identifier
"actions/github-script@v6" to use "actions/github-script@v7" so the workflow
matches other repos and uses the newer runner; locate the uses: entry in the
send-events-newsletter workflow (the line containing actions/github-script@v6)
and replace the version tag with `@v7`, then commit and verify the workflow runs
correctly.

---

Nitpick comments:
In @.github/workflows/send-events-newsletter.yml:
- Line 19: The workflow currently pins the runner's Node version using the YAML
key node-version: 16; update that value to the current LTS (node-version: 20) to
restore security patches and support, then run CI locally or via the workflow to
confirm no breaking changes; also search for other references to node-version:
16 (e.g., in job matrices or setup-node steps) and update them and any docs or
action inputs that mention Node 16.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5452683b-983c-41a4-812e-9f8487690065

📥 Commits

Reviewing files that changed from the base of the PR and between 3a138fe and 8984d52.

⛔ Files ignored due to path filters (1)
  • .github/workflows/create-event-helpers/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • .github/workflows/create-event-helpers/kit/htmlContent.js
  • .github/workflows/create-event-helpers/kit/index.js
  • .github/workflows/create-event-helpers/mailchimp/index.js
  • .github/workflows/create-event-helpers/package.json
  • .github/workflows/send-events-newsletter.yml
💤 Files with no reviewable changes (2)
  • .github/workflows/create-event-helpers/package.json
  • .github/workflows/create-event-helpers/mailchimp/index.js

Comment thread .github/workflows/create-event-helpers/kit/index.js
Comment thread .github/workflows/send-events-newsletter.yml Outdated
@princerajpoot20 princerajpoot20 marked this pull request as draft April 4, 2026 20:14
@princerajpoot20 princerajpoot20 marked this pull request as ready for review April 4, 2026 20:18
@aeworxet aeworxet moved this to In Progress in Bounty Program Apr 14, 2026
@aeworxet
Copy link
Copy Markdown
Contributor

@asyncapi/bounty_team

Copy link
Copy Markdown
Member

@fmvilas fmvilas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@sonarqubecloud
Copy link
Copy Markdown

@princerajpoot20
Copy link
Copy Markdown
Member Author

Update: We have created the official kit account and updated the required secrets wherever needed. I have also migrated all data from Mailchimp to Kit.

Proceeding to merge this PR

@princerajpoot20
Copy link
Copy Markdown
Member Author

/rtm

@asyncapi-bot asyncapi-bot merged commit bf3ff38 into asyncapi:master Apr 25, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Completed in Bounty Program Apr 25, 2026
@princerajpoot20
Copy link
Copy Markdown
Member Author

Testing in the PROD environment. Looks good.
Workflow run link: https://github.com/asyncapi/community/actions/runs/24944543877/job/73043596945

The meeting data has been collected successfully, and the email has also been scheduled successfully for April 27, 2026, at 7:00 AM EDT.

@princerajpoot20
Copy link
Copy Markdown
Member Author

Mail received. Everything looks good.
Screenshot 2026-04-27 at 5 45 34 PM
Screenshot 2026-04-27 at 5 46 59 PM
Screenshot 2026-04-27 at 5 47 06 PM

@princerajpoot20 princerajpoot20 linked an issue Apr 27, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

Migrate Newsletter Service to Kit.com

5 participants