Schedule maintenance window over "Free" events. (#21269)

#21268 
# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
This commit is contained in:
Victor Lyuboslavsky 2024-08-13 16:08:23 +02:00 committed by GitHub
parent b2cfc4082e
commit f891f4324d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -0,0 +1 @@
Scheduled maintenance events will now be scheduled over calendar events marked "Free" (not busy) in Google Calendar.

View file

@ -597,6 +597,11 @@ func (c *GoogleCalendar) createEvent(
continue
}
if gEvent.Transparency == "transparent" {
// Ignore events that do not block time on the calendar (e.g. free events)
continue
}
// Ignore events that the user has declined
var declined bool
for _, attendee := range gEvent.Attendees {