forge_notify: skip-reasons drop-list filter, configurable via agent.nix
This commit is contained in:
parent
b0f6bd8ece
commit
a94b504883
3 changed files with 72 additions and 4 deletions
|
|
@ -173,6 +173,31 @@
|
|||
'';
|
||||
};
|
||||
|
||||
options.hyperhive.forge.skipNotifyReasons = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
example = [
|
||||
"subscribed"
|
||||
"participating"
|
||||
];
|
||||
description = ''
|
||||
Forgejo notification `reason` values to suppress in the forge
|
||||
notification poller. Notifications with these reasons are marked
|
||||
read and silently dropped; all others — including notifications
|
||||
with a null or unrecognised reason — are delivered.
|
||||
|
||||
Drop-list is safer than an allow-list: directed signals
|
||||
(`review_requested`, `assigned`, `mention`) are never silently
|
||||
missed even if Forgejo returns an unexpected reason string.
|
||||
|
||||
Empty list (the default) delivers all notifications. Set to
|
||||
`[ "subscribed" "participating" ]` for agents like the manager
|
||||
that want only direct mentions and reviews, not the full repo
|
||||
firehose. Rendered to the `HIVE_FORGE_NOTIFY_SKIP_REASONS`
|
||||
environment variable consumed by the harness poller at runtime.
|
||||
'';
|
||||
};
|
||||
|
||||
options.hyperhive.dashboardLinks = lib.mkOption {
|
||||
type = lib.types.listOf (lib.types.submodule {
|
||||
options = {
|
||||
|
|
@ -332,6 +357,8 @@
|
|||
HIVE_COMPACT_WATERMARK_TOKENS = "0";
|
||||
} // lib.optionalAttrs config.hyperhive.forge.keepSubscriptions {
|
||||
HIVE_FORGE_KEEP_SUBSCRIPTIONS = "1";
|
||||
} // lib.optionalAttrs (config.hyperhive.forge.skipNotifyReasons != [ ]) {
|
||||
HIVE_FORGE_NOTIFY_SKIP_REASONS = lib.concatStringsSep "," config.hyperhive.forge.skipNotifyReasons;
|
||||
};
|
||||
|
||||
boot.isNspawnContainer = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue