[DO NOT MERGE]feat: Add options for MIME type and prefix filtering in report deletion script#61
Conversation
There was a problem hiding this comment.
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
--mimetypeCLI option to control which Drive file MIME types are eligible for deletion. - Adds
--prefixCLI 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.
There was a problem hiding this comment.
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
--mimetypeoption to control MIME type filtering for deletions. - Added
--prefixoption 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.
cfc3359 to
fbd6ebf
Compare
64aae30 to
a3661e1
Compare
There was a problem hiding this comment.
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
--mimetypeand--prefixoptions todelete_expired_reportsand thread them intoDriveApi.delete_files_older_than(...). - Compute a default prefix when
--prefixis 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.
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