in gcal.py [0:0]
def send_triage_reminder(service, date, emails):
"""Adds a triage reminder event to the Performance Team Google Calendar."""
details = {
"summary": "Reminder: perf triage rotation",
"description": DESCRIPTION.format(lead_sheriff=emails[0]),
"start": {
"dateTime": "{}T17:00:00Z".format(date), # utc.
},
"end": {
"dateTime": "{}T17:30:00Z".format(date), # utc.
},
"attendees": [{"email": email} for email in emails],
# Not sure if this key actually works.
"sendNotifications": True, # send an "Invitation: ..." email to attendees.
}
try:
event = service.events().insert(calendarId=ID_CALENDAR, body=details).execute()
print("Event created: {}".format(event.get("htmlLink")))
except HttpError as error:
print("Error when creating event: {}".format(error), file=sys.stderr)
raise error