Skip to content

feat(eventbrite): add Eventbrite integration - #233

Open
RishadAlam wants to merge 15 commits into
mainfrom
feat/eventbrite-integration
Open

RishadAlam wants to merge 15 commits into
mainfrom
feat/eventbrite-integration

Conversation

@RishadAlam

Copy link
Copy Markdown
Member

Description

Adds Eventbrite to Bit Integrations: 34 write actions covering events, recurring dates, event settings, ticket classes and groups, inventory tiers, order questions, discounts, venues, text overrides, seat maps and image uploads. Free holds the connection, the dropdown data and the screens; every call to Eventbrite happens in Pro. Pairs with Bit-Apps-Pro/bit-integrations-pro#155.

Motivation & Context

Ported from the Bit Flows (bit-pi) Eventbrite integration (Bit-Apps-Pro/bit-pi#865), following the SureContact and Flodesk shape for SaaS APIs: Free builds the ApiClient from a bearer-token connection and hands it, with the node settings, to the Pro handler.

Only write operations ship as actions; the read endpoints back the dropdowns instead. Eventbrite's triggers are external webhooks rather than WordPress hooks, so they are out of scope. The integration uses the Controller + RecordApiHelper shape because main has no ActionResolver yet.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation update
  • ⚡ Improvement
  • 🔄 Code refactor

Key Changes

Backend

  • Added EventbriteController with the bearer-token connection config, the ApiClient factory and eight dropdown fetchers (organizations, venues, events, ticket classes, ticket groups, categories, subcategories, formats) that follow Eventbrite's continuation pagination. Venues come from every organization when none is picked.
  • Added RecordApiHelper, which builds the field data, flattens the node's dropdown values and Utilities into settings, fires one hook per action and logs every path through LogHandler.
  • Added the client without a default Content-Type: application/json, because Eventbrite ignores the query string of a GET that carries one. Pro adds the header to non-GET requests.

Frontend

  • Added the authorization step, action layout, field map, Utilities, wizard and edit screens, all driven by staticData.js. Every action is pro-gated.
  • Added the field split the action rules ask for: IDs of the record an action changes are mapped fields; organization, venue, category, ticket groups and a discount's event and ticket classes are fetched dropdowns; fixed lists are selects; optional switches and choices sit under Utilities.
  • Added dependent dropdowns that reset and reload when their parent changes (organization → events and ticket groups, event → ticket classes, category → subcategories). Switching actions clears the previous action's settings, and Next/Update stay blocked until the required selects and fields are filled.
  • Added an ID suffix on dropdown items that share a name, and label reloading on the edit screen.
  • Added the integration to the new, edit and info routes, the action picker (Pro), the tutorial links and a 128px logo.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Tests added/updated
  • Documentation updated if needed
  • README updated if needed

Testing

Driven in the browser against the live Eventbrite API with a real private token. Each of the 34 actions was configured in the edit screen, saved, and run by posting to a Webhook trigger with mapped fields. All succeed except Create Seat Map for Event, which was checked on its error path only because the test account has no seat map to copy.

Also checked in the browser: the new-integration wizard (connection, Create Event, save, run), the edit and info screens, the organization → event → ticket class dropdown chain, required-select validation, multi-select Utilities and saved-value reloading. Prettier and eslint pass on the new folder; PHP syntax, php-cs-fixer and the PHP 7.4 compatibility check pass. NewInteg.jsx, IntegInfo.jsx and SelectAction.jsx already fail prettier on main, and EditInteg.jsx already has an eslint error there; this PR only adds lines to them.

Changelog

  • New Integration: Eventbrite — create, update, copy, publish, cancel and delete events, add recurring dates, manage tickets, ticket groups, inventory tiers, order questions, discounts and venues, override checkout texts and upload images

🤖 Generated with Claude Code

EventbriteController uses a bearer-token connection (the Eventbrite private token), runs the action, and serves the dropdown lists: organizations, venues, events, ticket classes, ticket groups, categories, subcategories and formats, following Eventbrite's continuation pagination.

RecordApiHelper builds the mapped fields and the node settings and fires one Pro hook per action, then logs the response. Every Eventbrite action is Pro.
staticData lists the 34 Pro actions with their mapped fields, required selects and optional Utilities. IDs of the record an action changes are mapped fields; organization, venue, category, ticket group and discount event choices are fetched dropdowns; fixed lists are selects.

The helpers load each dropdown from its route, pass the parent value (organization, category or event) it depends on, and check the required selects and mapped fields before the next step.
…components

The connection step uses the shared bearer-token connection form and says where to find the private token. The Utilities list opens a select (single or multiple) for each optional setting of the chosen action.
…screens

The layout renders the action's selects, field map and Utilities from staticData. Changing a parent select clears and reloads the selects that depend on it, and switching actions clears the previous action's settings. The edit screen reloads the dropdown labels of a saved integration.
Register the Eventbrite screens in the new, edit and info routes, add it to the action list as a Pro app, and add its logo and tutorial link entry.
When two fetched items share a name, such as two venues called the same in one city, add the item ID to their labels so the right one can be picked.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 09:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

Rebuild the 128px logo from Eventbrite's own brand mark (the logo-e-brand SVG on eventbrite.com, #FF5E30 on transparent) instead of the traced favicon. 2 KB.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 09:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Yes/no Utilities no longer open a Yes/No modal. Ticking the box stores
the value and unticking removes it, so nothing is sent and Eventbrite
keeps its default. Settings that Eventbrite turns on by default use
the opposite label (Unlisted, Hide Map, Save as Draft, Add-on Tier,
and so on) so a ticked box always changes something. Utilities with
real choices (time zone, currency, locale, ...) keep their modal.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 09:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 04:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Eventbrite rejects event currencies outside its 25 supported codes
(INR, BDT and others fail with "event.currency - INVALID"). The currency
dropdown now lists only those 25.
Eventbrite answers "delivery_methods - INVALID" for standard_shipping and
third_party_shipping on free and paid tickets alike. Only Electronic and
Will call remain.
…tier

Eventbrite treats capacity_total as quantity plus holds, so sending both
with different values fails with "inventory_tier.quantity_total - INVALID".
Update Inventory Tier now maps only the quantity.
It can only copy an existing seat map, and seat maps need Eventbrite's
reserved seating, which none of the test accounts has.
Copilot AI balanced review requested due to automatic review settings October 15, 2026 06:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 09:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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