Skip to content

feat: add --nodeclined support to remind command#8

Closed
snomiao wants to merge 3 commits into
mainfrom
feat/nodeclined-remind
Closed

feat: add --nodeclined support to remind command#8
snomiao wants to merge 3 commits into
mainfrom
feat/nodeclined-remind

Conversation

@snomiao
Copy link
Copy Markdown
Owner

@snomiao snomiao commented Feb 17, 2026

Ported from insanum/gcalcli#636 by @portothree.

Summary

  • Adds --nodeclined flag to the remind subcommand
  • Passes nodeclined argument through cli.pygcal.Remind()
  • Skips sending reminders for declined events

Why

Users on shared calendars with many declined events don't want reminders firing for events they've already declined.

Note: branch includes flake.nix/shell.nix from original author's dev setup — these are benign additions.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 17, 2026 11:14
@snomiao
Copy link
Copy Markdown
Owner Author

snomiao commented Feb 17, 2026

Closing in favor of PR with clean implementation from main (feat/nodeclined-remind-clean)

@snomiao snomiao closed this Feb 17, 2026
Copy link
Copy Markdown

Copilot AI left a comment

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 attempts to add support for the --nodeclined flag to the remind subcommand, allowing users to skip reminders for declined calendar events. The PR was ported from an external contribution and includes some developer tooling files (Nix configuration).

Changes:

  • Adds Nix development environment configuration (flake.nix, shell.nix, flake.lock)
  • Updates Remind method signature in gcal.py to accept a nodeclined parameter
  • Modifies cli.py to pass parsed_args.nodeclined to the Remind method

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
shell.nix Adds Nix shell configuration for Python 3.8 development environment with tox
flake.nix Adds Nix flake configuration for reproducible development environment
flake.lock Lock file for Nix flake dependencies
gcalcli/gcal.py Adds nodeclined parameter to Remind method signature
gcalcli/cli.py Passes parsed_args.nodeclined argument to Remind method call

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

Comment thread gcalcli/cli.py
gcal.Remind(
parsed_args.minutes, parsed_args.cmd,
use_reminders=parsed_args.use_reminders
parsed_args.nodeclined, use_reminders=parsed_args.use_reminders
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The parsed_args.nodeclined attribute will not exist because the --nodeclined flag is not defined in the remind subcommand parser. This will cause an AttributeError at runtime. The --nodeclined flag needs to be added to the remind subcommand definition in argparsers.py (either directly or by including output_parser as a parent).

Copilot uses AI. Check for mistakes.
Comment thread gcalcli/gcal.py
self.now, event_list, year_date=True, work=work)

def Remind(self, minutes, command, use_reminders=False):
def Remind(self, minutes, command, nodeclined, use_reminders=False):
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The nodeclined parameter is accepted but never used in the Remind method implementation. Following the pattern used by other methods like _tsv (line 604) and _iterate_events (line 1014), this method should check if self.options['ignore_declined'] and self._DeclinedEvent(event): continue in the event loop starting at line 1386. Note that the parameter should not be passed explicitly since it's already available via self.options after being passed through **vars(parsed_args) to GoogleCalendarInterface.

Copilot uses AI. Check for mistakes.
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