Skip to content

Add support for Google Calendar color_id field on Events#314

Open
burtonrhodes wants to merge 5 commits intonylas:mainfrom
burtonrhodes:Add-Google-Color-ID
Open

Add support for Google Calendar color_id field on Events#314
burtonrhodes wants to merge 5 commits intonylas:mainfrom
burtonrhodes:Add-Google-Color-ID

Conversation

@burtonrhodes
Copy link
Copy Markdown
Contributor

@burtonrhodes burtonrhodes commented Apr 30, 2026

Summary

  • Adds colorId field to Event, CreateEventRequest, and UpdateEventRequest models, mapped to the color_id JSON property
  • Adds colorId(String) builder methods on the create/update request builders
  • Currently only applies to Google Calendar events (see Google Calendar Colors)

Test plan

  • Updated EventsTests to assert color_id is deserialized on event fetch
  • Updated create/update event serialization tests to include colorId
  • Verify ./gradlew test passes locally

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

The license confirmation line is required per Contributing.md and pull_request_template.md since this is a contribution from outside Nylas.


Note

Low Risk
Additive, optional model field and builder setters with test coverage; minimal behavioral change aside from extra JSON property when provided.

Overview
Adds first-class support for Google Calendar event colors by introducing an optional colorId field on Event, CreateEventRequest, and UpdateEventRequest, mapped to the color_id JSON property.

Extends the create/update request builders to set colorId, updates the changelog, and expands EventsTests to cover color_id serialization/deserialization and omission when unset (including clearing via null on the update builder).

Reviewed by Cursor Bugbot for commit c267395. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.47%. Comparing base (ded101e) to head (b934968).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #314   +/-   ##
=========================================
  Coverage     82.47%   82.47%           
  Complexity      357      357           
=========================================
  Files            37       37           
  Lines          1027     1027           
  Branches         95       95           
=========================================
  Hits            847      847           
  Misses          121      121           
  Partials         59       59           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

cursor[bot]

This comment was marked as resolved.

@cursor

This comment was marked as low quality.

@googsvg
Copy link
Copy Markdown
Contributor

googsvg commented Apr 30, 2026

@burtonrhodes thank you so much for your contribution ❤️

we appreciate community suggestions and updates, so this is more than welcome PR :)

it will be released with next SDK deployment, soon :)

@burtonrhodes
Copy link
Copy Markdown
Contributor Author

@googsvg Of course! Will be glad to use in the next release. My users have been wanting this for a while.

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.

3 participants