Skip to content

Adds new command outlook event add. Closes #7123 - #7478

Open
MartinM85 wants to merge 2 commits into
pnp:mainfrom
MartinM85:feature/7123-outlook-event-add
Open

Adds new command outlook event add. Closes #7123#7478
MartinM85 wants to merge 2 commits into
pnp:mainfrom
MartinM85:feature/7123-outlook-event-add

Conversation

@MartinM85

Copy link
Copy Markdown
Contributor

Closes #7123

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Microsoft Graph-backed Outlook command (m365 outlook event add) to create calendar events, including validation, tests, and documentation updates across the CLI and docs site.

Changes:

  • Introduces outlook event add command implementation and command registration.
  • Adds Graph date-time validation helper plus unit tests.
  • Adds command docs page and sidebar entry.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/utils/validation.ts Adds isValidGraphDateTime helper for validating Graph-style date-time strings.
src/utils/validation.spec.ts Adds unit tests for isValidGraphDateTime.
src/m365/outlook/commands/event/event-add.ts Implements m365 outlook event add including option schema, validation refinements, and request payload construction.
src/m365/outlook/commands/event/event-add.spec.ts Adds comprehensive tests for option validation and request body construction.
src/m365/outlook/commands.ts Registers the new EVENT_ADD command name.
docs/src/config/sidebars.ts Adds the new command doc page to the Outlook sidebar navigation.
docs/docs/cmd/outlook/event/event-add.mdx Adds end-user documentation for the new command, options, examples, and permissions.
Suppressed comments (1)

src/m365/outlook/commands/event/event-add.ts:315

  • When reminderMinutesBeforeStart is 0, it won’t be sent to Graph because the check uses a truthy condition. Use an undefined check so 0 is preserved.
    if (args.options.isReminderOn && args.options.reminderMinutesBeforeStart) {
      body['reminderMinutesBeforeStart'] = args.options.reminderMinutesBeforeStart;
    }

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/m365/outlook/commands/event/event-add.ts Outdated
Comment thread src/m365/outlook/commands/event/event-add.ts Outdated
Comment thread src/m365/outlook/commands/event/event-add.ts Outdated
Comment thread src/m365/outlook/commands/event/event-add.ts
Comment thread src/m365/outlook/commands/event/event-add.ts Outdated
Comment thread src/m365/outlook/commands/event/event-add.spec.ts
Comment thread docs/docs/cmd/outlook/event/event-add.mdx
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.

New command: outlook event add

2 participants