Skip to content

[DO NOT MERGE]feat: Add options for MIME type and prefix filtering in report deletion script#61

Open
ttak-apphelix wants to merge 4 commits intomasterfrom
ttak-apphelix/BOMS-398-delete-parameter_update
Open

[DO NOT MERGE]feat: Add options for MIME type and prefix filtering in report deletion script#61
ttak-apphelix wants to merge 4 commits intomasterfrom
ttak-apphelix/BOMS-398-delete-parameter_update

Conversation

@ttak-apphelix
Copy link
Copy Markdown
Member

@ttak-apphelix ttak-apphelix commented Mar 16, 2026

Description:

This PR updates the GDPR partner report deletion CLI script to support configurable filtering when selecting Google Drive files for deletion.

Changes:

Adds --mimetype CLI option to control which Drive file MIME types are eligible for deletion.
Adds --prefix CLI option to control which filename prefixes are eligible for deletion, with a computed default.

Related PR

Copilot AI review requested due to automatic review settings March 16, 2026 09:57
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 updates the GDPR partner report deletion CLI script to support configurable filtering when selecting Google Drive files for deletion.

Changes:

  • Adds --mimetype CLI option to control which Drive file MIME types are eligible for deletion.
  • Adds --prefix CLI option to control which filename prefixes are eligible for deletion, with a computed default.

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

Comment thread tubular/scripts/delete_expired_partner_gdpr_reports.py Outdated
Comment thread tubular/scripts/delete_expired_partner_gdpr_reports.py
Comment thread tubular/scripts/delete_expired_partner_gdpr_reports.py
Copilot AI review requested due to automatic review settings March 16, 2026 10:04
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 updates the delete_expired_partner_gdpr_reports.py CLI to allow callers to customize which Google Drive files are targeted for deletion via optional MIME type and filename prefix filters.

Changes:

  • Added --mimetype option to control MIME type filtering for deletions.
  • Added --prefix option and logic to override the default report filename prefix pattern.
  • Wired these options into the DriveApi.delete_files_older_than(...) call.

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

Comment thread tubular/scripts/delete_expired_partner_gdpr_reports.py
@ttak-apphelix ttak-apphelix force-pushed the ttak-apphelix/BOMS-398-delete-parameter_update branch from cfc3359 to fbd6ebf Compare March 16, 2026 10:09
Copilot AI review requested due to automatic review settings March 16, 2026 10:23
@ttak-apphelix ttak-apphelix force-pushed the ttak-apphelix/BOMS-398-delete-parameter_update branch from 64aae30 to a3661e1 Compare March 16, 2026 10:25
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

Adds CLI configurability to the GDPR partner report deletion script so callers can filter deletions by MIME type and/or filename prefix, and updates the test helper to pass these new flags.

Changes:

  • Add --mimetype and --prefix options to delete_expired_reports and thread them into DriveApi.delete_files_older_than(...).
  • Compute a default prefix when --prefix is omitted (or empty).
  • Refactor the test helper to build the CLI arg list and optionally include the new flags.

Reviewed changes

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

File Description
tubular/tests/test_delete_expired_reports.py Updates _call_script to support passing --mimetype / --prefix in test invocations.
tubular/scripts/delete_expired_partner_gdpr_reports.py Adds the new Click options and uses them when invoking Drive deletion.

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

Comment thread tubular/scripts/delete_expired_partner_gdpr_reports.py
Comment thread tubular/tests/test_delete_expired_reports.py
Comment thread tubular/tests/test_delete_expired_reports.py Outdated
Comment thread tubular/scripts/delete_expired_partner_gdpr_reports.py
Comment thread tubular/scripts/delete_expired_partner_gdpr_reports.py
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.

2 participants