Commit Graph

696 Commits

Author SHA1 Message Date
renovate[bot]
30d43b0a63 fix(deps): update rust crate clap to 4.5.53 2025-11-24 12:58:01 +00:00
Jerus Bot
9b260a5b34 chore: update prlog for pr 2025-11-24 12:44:09 +00:00
renovate[bot]
45f0c91cbe fix(deps): update rust crate base64 to 0.22.1 2025-11-24 12:44:09 +00:00
Jerus Bot
475a840ada chore: update prlog for pr 2025-11-24 12:15:27 +00:00
Jeremiah Russell
0ca55978d0 📦 build(dependencies): upgrade several dependencies
- upgrade indicatif from 0.17 to 0.18.3
- upgrade other dependencies to the latest version
2025-11-24 12:15:27 +00:00
renovate[bot]
3d8ffa6298 fix(deps): update rust crate assert_fs to 1.1.3 2025-11-24 12:15:27 +00:00
Jerus Bot
f73c005a30 chore: update prlog for pr 2025-10-31 16:09:05 +00:00
Jeremiah Russell
724f444133 🔧 chore(rules_cli): enhance CLI command structure with clap attributes
- add clap attributes for better command organization
- improve subcommand naming and aliases for usability
- attributes disabled as dependent on future clap feature
2025-10-31 16:09:05 +00:00
Jeremiah Russell
8f910772dd 🔧 chore(dependencies): clap test and tidy ups
- explicitly list tokio features for clarity and maintainability
2025-10-31 16:09:05 +00:00
Jerus Bot
5bf794438b chore: update prlog for pr 2025-10-31 14:42:32 +00:00
Jeremiah Russell
209b8a6a46 feat(cli): restructure rules config CLI
- 【Refactor】Move label subcommands (add, list, remove) into separate modules for better organization
- 【Refactor】Rename `LabelCli` to `ListLabelCli`, `AddCli` to `AddLabelCli`, and `RemoveCli` to `RemoveLabelCli`
- 【Refactor】Rename `LabelCommands` to `List`, `Add`, and `Remove`
- 【Refactor】Rename `remove-rule` alias to `rm-rule` and `remove-label` alias to `rm-label`
- 【Feat】Add `ListLabelCli`, `AddLabelCli`, and `RemoveLabelCli` to handle label-related operations
- 【Feat】Update `ConfigCli` to use the new label subcommands and modules
- 【Remove】Remove the `label_cli.rs` file as its functionality is now distributed
2025-10-31 14:42:32 +00:00
Jeremiah Russell
9773327e86 ♻️ refactor(cli): rename rule management subcommands for clarity
- rename `add`, `rm`, and `action` subcommands to `add-rule`, `remove-rule`, and `set-action-on-rule` respectively to improve clarity
- update corresponding modules and structs to reflect the renaming, enhancing code readability and maintainability
2025-10-31 14:42:32 +00:00
Jerus Bot
b64b2d00bd chore: update prlog for pr 2025-10-31 12:03:15 +00:00
Jeremiah Russell
b10dcbf8a9 feat(cli): enhance rules configuration
- introduce subcommands for listing, adding, and removing rules
- improve cli structure for better user experience
2025-10-31 12:03:15 +00:00
Jerus Bot
f0a5dde809 chore: update prlog for pr 2025-10-31 11:03:38 +00:00
Jeremiah Russell
a512792774 🐛 fix(client): fix config root parsing
- add debug logging for configurations to aid in troubleshooting
2025-10-31 11:03:38 +00:00
Jerus Bot
c2c1df2629 chore: update prlog for pr 2025-10-31 09:40:30 +00:00
Jeremiah Russell
bf8d1c3cf4 feat(cli): add optional rules path argument to cli
- allow users to specify a rules file path via command line argument
- update run_with_rules_path to prioritize cli argument over config file
2025-10-31 09:40:30 +00:00
Jerus Bot
14c7d6435e chore: Release cull-gmail v0.0.16 2025-10-30 22:38:11 +00:00
Jerus Bot
7febf50c27 chore: update prlog for pr 2025-10-30 13:46:19 +00:00
Jeremiah Russell
87e9e47395 🐛 fix(rule_processor): enhance logging for chunk processing
- change trace logs to info logs for chunk processing in rule_processor
- improve visibility of chunk processing status and debugging
2025-10-30 13:46:19 +00:00
Jerus Bot
2da4642c06 chore: update prlog for pr 2025-10-30 13:36:40 +00:00
Jeremiah Russell
e9eccb6ef6 🐛 fix(cli): correct rule execution order for trash and delete
- correct the order of rule execution to delete before trashing
- trashed messages will not be deleted
2025-10-30 13:36:40 +00:00
Jeremiah Russell
dc41101dcb ♻️ refactor(rules): execute rules by action
- executes rules by action: `Trash` first, then `Delete`
- a label may have a `trash` and `delete` rule applied
2025-10-30 12:26:12 +00:00
Jerus Bot
0d670d3b68 chore: update prlog for pr 2025-10-30 12:26:12 +00:00
Jeremiah Russell
cb53faf3b3 feat(rules): support multiple actions per label
- support trash and delete actions for the same label
- add `run_rules_for_action` function to filter rules by action
- update `get_rules_by_label` to `get_rules_by_label_for_action`
- update `find_label` to return a vector of rule ids
- update `remove_rule_by_label` to remove all rules with the label
2025-10-30 12:26:12 +00:00
Jeremiah Russell
afe798dae0 📝 docs(rule_processor): clarify Gmail API scope requirement
- refine the documentation for batch_delete and call_batch_delete functions
- specify the exact `https://mail.google.com/` scope needed
2025-10-30 10:40:29 +00:00
Jeremiah Russell
cc57a6aec8 ♻️ refactor(gmail): consolidate batch processing logic
- introduce process_in_chunks for DRY principle
- remove redundant chunking logic from batch_delete
- update documentation for API scope requirements
2025-10-30 10:40:29 +00:00
Jerus Bot
99d9c09aa1 chore: update prlog for pr 2025-10-30 10:40:29 +00:00
Jeremiah Russell
fc85f46e80 ♻️ refactor(rule_processor): enhance Gmail message handling with chunk processing
- introduce `process_in_chunks` for batch operations to respect API limits
- refactor `batch_trash` to use `process_in_chunks` for efficient trashing
- add documentation for `process_in_chunks` explaining chunking and API limits
2025-10-30 10:40:29 +00:00
Jeremiah Russell
01c337d94c 📝 docs(rules): clarify scope usage for Gmail operations
- correct grammar in scope description
2025-10-30 10:40:29 +00:00
Jeremiah Russell
23ea5a82b0 feat(rule_processor): implement batch operations for message deletion and trashing
- introduce `call_batch_delete` to permanently delete messages in chunks
- introduce `call_batch_trash` to move messages to trash in chunks
- refactor `batch_delete` and `batch_trash` to use chunking for large lists
- add constants for `INBOX_LABEL` for clarity
- update documentation to reflect the new chunking approach and api requirements
2025-10-30 10:40:29 +00:00
Jerus Bot
1a7d1f950c chore: update prlog for pr 2025-10-29 13:56:02 +00:00
Jeremiah Russell
83a5c45cb5 🐛 fix(gmail): use GMAIL_DELETE_SCOPE for batch delete
- use GMAIL_DELETE_SCOPE instead of GMAIL_MODIFY_SCOPE for batch delete operation
- GMAIL_DELETE_SCOPE is required for batch delete to work
2025-10-29 13:56:02 +00:00
Jerus Bot
4d3b554309 chore: update prlog for pr 2025-10-29 13:51:18 +00:00
Jeremiah Russell
a3623d560d 🐛 fix(cli): correct logging level
- remove redundant check for logging level
2025-10-29 13:51:18 +00:00
Jeremiah Russell
357da7f23b 🐛 fix(eol_rule): correct calculate_for_date and add logging
- Fix the EOL date calculation by using checked_sub_signed to prevent panics
- Add debug logging to track message age, delta, and deadline calculations
- Corrected test case to account for new calculation and added logger to test
2025-10-29 13:51:18 +00:00
Jeremiah Russell
4f87647339 🐛 fix(rules): correct grammar and improve date calculation
- correct a grammatical error in a comment
- add logging for debugging date calculations
- add a new test case for 1032 days to ensure correct calculation
2025-10-29 13:51:18 +00:00
Jerus Bot
1e5336619b chore: update prlog for pr 2025-10-29 07:20:20 +00:00
Jeremiah Russell
f493dfae04 🐛 fix(gmail): handle batch delete errors
- fix batch delete failure by logging the response before returning
- handle batch delete errors and prevent program termination
2025-10-29 07:20:20 +00:00
Jerus Bot
b8aacb8998 chore: update prlog for pr 2025-10-28 16:50:30 +00:00
Jeremiah Russell
bf65721cec ♻️ refactor(core): rename initialise_message_list to initialise_lists
- rename initialise_message_list to initialise_lists for clarity
- update all references to the function with the new name
- the function now initialises both message and label lists
2025-10-28 16:50:30 +00:00
Jerus Bot
ed0d7e6bf3 chore: update prlog for pr 2025-10-28 16:37:31 +00:00
Jeremiah Russell
4749e83cf3 feat(rule_processor): add initialise_message_list to processor
- add initialise_message_list fn to RuleProcessor trait and impl
- ensure rule is only processed on in-scope messages
- call initialise_message_list before processing any labels
2025-10-28 16:37:31 +00:00
Jerus Bot
ef0c9ebd89 chore: Release cull-gmail v0.0.15 2025-10-26 09:23:39 +00:00
Jerus Bot
8da4a11dd9 chore: update prlog for pr 2025-10-25 22:58:36 +01:00
Jeremiah Russell
03b6bdfaa6 📝 docs(cli): improve config subcommand documentation
- clarify the purpose of the config subcommand
- correct spelling error: "behaviour"
2025-10-25 22:58:36 +01:00
Jeremiah Russell
dcfae4517b 🐛 fix(cli): fix log messages with empty arguments
- fix log messages with empty arguments
2025-10-25 22:58:36 +01:00
Jeremiah Russell
50335ca38e 🐛 fix(cli): prevent dry-run from crashing
- prevent dry-run crashing by calling log messages function
2025-10-25 22:58:36 +01:00
Jeremiah Russell
50beaeaef4 🐛 fix(rule_processor): fix batch_trash and batch_delete signatures
- change &self to &mut self for batch_trash and batch_delete functions
- add logging for messages being trashed and deleted
2025-10-25 22:58:36 +01:00