Commit Graph

606 Commits

Author SHA1 Message Date
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
Jeremiah Russell
e106455953 ♻️ refactor(message_list): allow pre/post text in log_messages
- allow `log_messages` to take `pre` and `post` parameters
- this will allow calling functions to format the log output
- add documentation for parameters
2025-10-25 22:58:36 +01:00
Jerus Bot
54cf711420 chore: Release cull-gmail v0.0.14 2025-10-23 13:01:46 +00:00
Jerus Bot
2e39dd87c3 chore: update prlog for pr 2025-10-23 13:00:21 +01:00
Jeremiah Russell
f07f0e8f5b 🐛 fix(config): reduce log verbosity
- change log level from info to trace to reduce verbosity
2025-10-23 13:00:21 +01:00
Jerus Bot
19fa3ba966 chore: update prlog for pr 2025-10-23 12:09:04 +01:00
Jeremiah Russell
7bbc41e1c3 🔧 chore(vscode): update cspell dictionary
- add "creds", "tokencache", and "trdir" to cspell dictionary
2025-10-23 12:09:04 +01:00
Jeremiah Russell
6d24a0175c feat(cli): add token and auth uri config options
- allow users to configure token_uri and auth_uri in config file
- add default values for token_uri and auth_uri
2025-10-23 12:09:04 +01:00
Jeremiah Russell
15599e2258 🧹 Refactor: add run_init_basic helper to eliminate command duplication 2025-10-23 11:16:25 +01:00
Jerus Bot
47a9233856 chore: update prlog for pr 2025-10-23 11:16:25 +01:00
Jeremiah Russell
4550ffca92 🧹 Refactor: eliminate test duplication with helper functions 2025-10-23 11:16:25 +01:00
Jeremiah Russell
5228a24b32 📝 Update documentation for --skip-rules flag 2025-10-23 11:16:25 +01:00
Jeremiah Russell
cc8259bd6a Add integration tests for --skip-rules 2025-10-23 11:16:25 +01:00
Jeremiah Russell
e33c0320a0 Add unit tests for --skip-rules functionality 2025-10-23 11:16:25 +01:00
Jeremiah Russell
c39e64f0ac Implement core logic for --skip-rules in init 2025-10-23 11:16:25 +01:00
Jeremiah Russell
0b24767065 Add --skip-rules flag to init command 2025-10-23 11:16:25 +01:00
Jerus Bot
79e0de72e6 chore: update prlog for pr 2025-10-23 07:37:30 +01:00
Jeremiah Russell
05b4a968f7 🐛 fix(config): improve config logging format
- use pretty format for config logging to enhance readability
2025-10-23 07:37:30 +01:00
Jerus Bot
c3d2f818b8 chore: update prlog for pr 2025-10-23 06:52:46 +01:00
Jeremiah Russell
89fce9792e feat(config): load application secret with logging
- add logging to indicate the source of the application secret
- log the configuration root to aid in debugging credential file loading
2025-10-23 06:52:46 +01:00
Jerus Bot
2ec8e00119 chore: Release cull-gmail v0.0.13 2025-10-22 16:37:03 +00:00
Jerus Bot
33710e48c1 chore: update prlog for pr 2025-10-22 17:35:43 +01:00
Jeremiah Russell
c1f7cf859a 🐛 fix(cli): load config file only if it exists
- only load config file if it exists
- prevents error when config file is not present
2025-10-22 17:35:43 +01:00
Jeremiah Russell
2af6df145f 🐛 fix(cli): fix config file loading
- remove unnecessary config_file.required(false)
2025-10-22 17:35:43 +01:00
Jeremiah Russell
825f2de316 🐛 fix(client_config): print config for debugging
- add log to print config for debugging
2025-10-22 17:35:43 +01:00
Jeremiah Russell
4aef4608fc feat(cli): enhance configuration loading with logging
- add logging to display the config file being loaded
2025-10-22 17:35:43 +01:00
Jeremiah Russell
3112e23040 🐛 fix(cli): correct spelling errors in documentation
- correct spelling of "behaviour" to "behavior"
- correct spelling of "dry-run mode"
2025-10-22 17:35:43 +01:00
Jeremiah Russell
60d37dfc41 🐛 fix(cli): load config file as optional
- the config file should not be required
- set required to false
2025-10-22 17:35:43 +01:00
Jerus Bot
9b16105776 chore: Release cull-gmail v0.0.12 2025-10-22 13:40:14 +00:00
Jerus Bot
65c3ac41b9 chore: update prlog for pr 2025-10-22 12:10:24 +01:00
Jeremiah Russell
2b2c0ca414 📦 build(ci): upgrade circleci-toolkit orb to v2.13.5
- upgrade circleci-toolkit orb to the latest version
- remove deprecated commands and jobs
2025-10-22 12:10:24 +01:00
Jerus Bot
23361bf936 chore: update prlog for pr 2025-10-22 11:24:20 +01:00
Jeremiah Russell
fa72a93e1d 🐛 fix(ci): correct default test runner value
- fix default test runner value in circleci config
2025-10-22 11:24:20 +01:00
Jeremiah Russell
4283adf7b2 ♻️ Refactor duplicated test setup in integration tests
Extract repeated test command setup into helper functions:
- run_init_with_dirs() for tests with separate config/rules directories
- run_init_with_credential() for tests with credential files

This eliminates code duplication and makes tests more maintainable.
Also fixed duplicate #[test] attribute warning.
2025-10-22 06:38:00 +01:00
Jeremiah Russell
d92d4ad9c0 ♻️ Refactor duplicated InitCli creation in tests
Extract repeated InitCli instance creation into helper functions:
- create_test_init_cli() for default test instances
- create_test_init_cli_with_force() for force-enabled instances

This reduces code duplication and makes test setup more maintainable.
2025-10-22 06:38:00 +01:00
Jerus Bot
acb5e11b4b chore: update prlog for pr 2025-10-22 06:38:00 +01:00
Jeremiah Russell
2b29382d5e 🎨 Apply cargo fmt formatting 2025-10-22 06:38:00 +01:00
Jeremiah Russell
10a1a1e058 🐛 Fix duplicate CreateDir operation in init planning
Prevent duplicate CreateDir operations when rules directory
is the same as config directory by checking if the directory
creation has already been planned before adding another one.
2025-10-22 06:38:00 +01:00
Jeremiah Russell
d4cc2621db Add configurable rules directory support
- Add rules configuration option to ClientConfig
- Support custom rules file paths via config and CLI
- Add --rules-dir option to init command
- Update Rules struct to accept custom file paths
- Add helper functions for rules path resolution
- Fix doc comment formatting issues
- Add integration tests for custom rules paths
2025-10-22 06:38:00 +01:00
Jeremiah Russell
e914e492e8 test: add integration tests for --rules-dir feature
- Add test_init_with_separate_rules_directory to verify rules created in custom location
- Add test_init_rules_dir_dry_run to verify dry-run behavior with --rules-dir
- Verify config file contains correct rules path when using separate directory
- All 12 init integration tests passing (11 run, 1 ignored)
2025-10-22 06:38:00 +01:00
Jeremiah Russell
bcb93fd68f feat: integrate configurable rules path throughout CLI
- Make parse_config_root() public for reuse in main.rs
- Add get_rules_path() helper to extract and resolve rules path from config
- Update main CLI to use configured rules path for default rule execution
- Add run_with_rules_path() method to RulesCli for custom path support
- Update all unit tests to include rules_dir field
- Rules path now supports h:, c:, r: prefixes throughout the application
2025-10-22 06:38:00 +01:00