feat: Phase 5 — filtres, actions Ntfy, outgoing webhooks, state file
CI / test (push) Successful in 2m34s

- Filtres avancés: drop, set_priority, add_tag avec wildcard * (filter_outgoing.v)
- Notifications structurées: click_url + actions (ntfy.v + sources/event.v)
- Webhook sortant: Slack, Discord, JSON (filter_outgoing.v)
- Fichier d'état: persistance poll_state + silence_until (filter_outgoing.v)
- Config: sections filters, outgoing, state (config.v)
- Tests: 9 nouveaux tests unitaires (filter_outgoing_test.v)
- Docs: ROADMAP Phase 5 4/8, version 0.5.0
This commit is contained in:
2026-08-03 17:41:53 -04:00
parent 5d0db9478c
commit 4150c56054
9 changed files with 422 additions and 30 deletions
+39 -4
View File
@@ -31,6 +31,33 @@ pub mut:
rate_limit RateLimitConfig @[json: 'rate_limit']
}
// v0.5 — Advanced filters
pub struct FilterRule {
pub mut:
match_source string @[json: 'match_source'] // source type: gitea, docker, etc.
match_name string @[json: 'match_name'] // source name (supports * glob)
match_topic string @[json: 'match_topic'] // topic name
action string @[json: 'action'] // drop, set_priority:N, add_tag:X
value string @[json: 'value'] // value for set_priority / add_tag
}
// v0.5 — Outgoing webhook (Slack, Discord, etc.)
pub struct OutgoingWebhook {
pub mut:
url string @[json: 'url']
format string @[json: 'format'] // slack, discord, json
}
pub struct FilterConfig {
pub mut:
rules []FilterRule @[json: 'rules']
}
pub struct OutgoingConfig {
pub mut:
webhooks []OutgoingWebhook @[json: 'webhooks']
}
pub struct SourcesConfig {
pub mut:
gitea []sources.GiteaSource @[json: 'gitea']
@@ -43,10 +70,18 @@ pub mut:
pub struct Config {
pub mut:
server ServerConfig @[json: 'server']
defaults DefaultConfig @[json: 'defaults']
sources SourcesConfig @[json: 'sources']
dedup DedupConfig @[json: 'dedup']
server ServerConfig @[json: 'server']
defaults DefaultConfig @[json: 'defaults']
sources SourcesConfig @[json: 'sources']
dedup DedupConfig @[json: 'dedup']
filters FilterConfig @[json: 'filters']
outgoing OutgoingConfig @[json: 'outgoing']
state StateConfig @[json: 'state']
}
pub struct StateConfig {
pub mut:
file string @[json: 'file'] // path to state file for persisting poll_state
}
pub fn load_config(path string) !Config {