Skip to content

chore(meetup): replace in-repo Meetup scripts with published coopkit action#62

Open
duxi90 wants to merge 1 commit into
mainfrom
chore/meetup-coopkit-action
Open

chore(meetup): replace in-repo Meetup scripts with published coopkit action#62
duxi90 wants to merge 1 commit into
mainfrom
chore/meetup-coopkit-action

Conversation

@duxi90

@duxi90 duxi90 commented Jun 2, 2026

Copy link
Copy Markdown
Member

What & why

We published cppserbia/coopkit-meetup-action (Marketplace) wrapping the @coopkit/meetup npm package — itself an extraction of this repo's scripts/meetup/* + scripts/create-meetup-event.ts. Keeping both was pure duplication. This PR dogfoods the published action and deletes the redundant in-repo Meetup OAuth/GraphQL code (~1000 lines).

The PR-driven flow is preserved exactly: label meetup-event → create draft → write event_url/event_id back → commit → comment. This is possible because coopkit-meetup-action@v1.1.0 now exposes status / event-id / event-url / photo-attached outputs (running @coopkit/meetup@0.2.0 with --output), so the writeback works with the composite action.

Changes

  • coopkit.config.json (new) — meetup.groupUrlname (cpp-serbia) + venue map, ported verbatim from scripts/meetup/venues.ts.
  • scripts/meetup-pr-event.ts (+test, new) — thin glue, no Meetup API code. inputs <file> maps frontmatter → action inputs (canonical UTC date, H1-stripped description) and flags already-created for idempotency (the action's create-from-json is not idempotent); writeback <file> persists the action's outputs into the event frontmatter. Reuses stripLeadingHeading/isEventAlreadyCreated from @coopkit/meetup.
  • .github/workflows/meetup-event-draft.yml — keeps trigger/gating/find-file; drops the manual PEM handling (the action takes the key as input); calls cppserbia/coopkit-meetup-action@v1; writeback + commit + comment gated on status == 'created'; create step skipped when already-created.
  • scripts/download-meetup-images.ts — imports createMeetupClient from @coopkit/meetup (+ loadEnvFile()); same MEETUP_* env contract.
  • Deleted scripts/meetup/ and scripts/create-meetup-event.ts (+test).
  • package.json — add @coopkit/meetup ^0.2.0; remove jsonwebtoken + @types/jsonwebtoken (now transitive). Lockfile regenerated with pnpm 9 (lockfileVersion 9.0).
  • Docs (CLAUDE.md, scripts/README.md, CONTRIBUTING.md) + cspell terms (coopkit, bunx, writeback).

Verification

  • typecheck · test (660) · spell · lint · format:check
  • pnpm install --frozen-lockfile (CI parity)
  • ✅ Glue parity on a real event: canonical UTC date, correct venue-key, H1-stripped description, already-created flag

Reviewer notes / before merge

  • The MEETUP_GROUP_URLNAME repo variable is now unused (group lives in config) — safe to remove from repo settings.
  • The four MEETUP_* secrets are unchanged; they're piped into the action.
  • End-to-end can only be exercised against the live Meetup API — worth a throwaway-event PR labeled meetup-event to confirm draft + writeback commit + comment, then delete the resulting draft.

🤖 Generated with Claude Code

…action

Dogfood our published Marketplace action cppserbia/coopkit-meetup-action@v1
(v1.1.0, wrapping @coopkit/meetup) instead of maintaining a duplicate copy of
the OAuth/GraphQL event-creation code in-repo.

The PR-driven flow is preserved exactly: label `meetup-event` -> create draft ->
write event_url/event_id back -> commit -> comment. v1.1.0 now exposes
status/event-id/event-url outputs, so the writeback works with the composite
action.

- coopkit.config.json: group + venue map (ported from scripts/meetup/venues.ts)
- scripts/meetup-pr-event.ts (+test): thin glue, no Meetup API code —
  `inputs` maps frontmatter to action inputs (+ already-created idempotency
  flag), `writeback` persists the action outputs to the event file
- .github/workflows/meetup-event-draft.yml: calls the action, consumes outputs
- download-meetup-images.ts: now imports createMeetupClient from @coopkit/meetup
- delete scripts/meetup/ and scripts/create-meetup-event.ts (+test)
- package.json: add @coopkit/meetup; drop jsonwebtoken (+types), now transitive
- docs (CLAUDE.md, scripts/README.md, CONTRIBUTING.md) + cspell terms

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cppserbia-org-website Ready Ready Preview, Comment, Open in v0 Jun 2, 2026 12:04pm

Request Review

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.

1 participant