Skip to content

Honor global --profile and --format flags in calendar commands#2

Open
jarvisluong wants to merge 2 commits into
ianpatrickhines:masterfrom
tekaigroup:fix/calendar-profile-usage
Open

Honor global --profile and --format flags in calendar commands#2
jarvisluong wants to merge 2 commits into
ianpatrickhines:masterfrom
tekaigroup:fix/calendar-profile-usage

Conversation

@jarvisluong

Copy link
Copy Markdown

Read global CLI options in calendar subcommands so profile selection and output
format work consistently with the rest of gwcli. This prevents calendar
commands from silently falling back to the default profile.

Co-authored-by: Copilot [email protected]

   Read global CLI options in calendar subcommands so profile selection and output
   format work consistently with the rest of gwcli. This prevents calendar
   commands from silently falling back to the default profile.

   Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings March 14, 2026 21:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the calendar CLI subcommands to consistently honor the global --profile and --format flags (matching behavior of other command groups), preventing calendar commands from unintentionally using the default profile/output format.

Changes:

  • Read global CLI flags in calendar subcommands via optsWithGlobals() rather than relying on subcommand options.
  • Wire Command into calendar subcommand .action(...) callbacks to access parent/global options.
  • Align package-lock.json package name with package.json, and ignore client_secrets/ in .gitignore.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/commands/calendar.ts Uses optsWithGlobals() so calendar subcommands honor global --profile/--format.
package-lock.json Updates lockfile package name to google-workspace-cli.
.gitignore Adds client_secrets/ to prevent committing OAuth secrets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/commands/calendar.ts Outdated
import type { GlobalOptions } from '../types/index.js';

function getCalendarGlobalOptions(command: Command): GlobalOptions {
return command.parent?.optsWithGlobals() as GlobalOptions;
…ned and recursive concerns

Co-authored-by: jarvisluong <[email protected]>
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