Skip to content

Conversation

@luhuhis
Copy link

@luhuhis luhuhis commented May 28, 2022

This does what I've described in issue #14

@bartier
Copy link

bartier commented Jul 18, 2022

Why this is not reviewed yet? This is such a important feature. +1 to this.

@mmurshed
Copy link

+1 on this. Please add a co-mainter for this project.

method: 'PUT',
endpoint: `${ENDPOINT_BASE}/${CALENDAR_TO_MERGE_INTO}/events/${target_event.id}`,
requestBody: {
summary: `${SEARCH_CHARACTER}${source_event.summary} ${calendarName}`,

Choose a reason for hiding this comment

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

Can you please move this prefix calendarName to the beginning like the main code does?

method: 'POST',
endpoint: `${ENDPOINT_BASE}/${CALENDAR_TO_MERGE_INTO}/events`,
requestBody: {
summary: `${SEARCH_CHARACTER}${source_event.summary} ${calendarName}`,

Choose a reason for hiding this comment

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

If the PUT call create a calendar with name "Test [Work]", will the POST for update it to "Test [Work] [Work]"? Looks like a bug.

// Only consider events that are not "free".
if (source_event.transparency !== 'transparent') {

const target_event = target_events.filter((candidate_event) => (candidate_event.iCalUID == source_event.iCalUID))[0];

Choose a reason for hiding this comment

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

Should it be candidate_event.iCalUID === source_event.iCalUID? What if candidate_event is null?

}

console.log(`${result.length} deleted events.`);
console.log(`${result.length} events ${action}d.`);

Choose a reason for hiding this comment

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

Typo ${action}d.

@mmurshed
Copy link

We also need a force delete option.

// check if target event exists and update it if it does. if not, then create it.
requestBody_update = []
requestBody_create = []
let new_description = ""

Choose a reason for hiding this comment

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

Remove this.

@luhuhis
Copy link
Author

luhuhis commented Aug 17, 2022

I will fix the issues you found as soon as I find some time! Thanks for reviewing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants