Sort out sending to gitea channel
This commit is contained in:
@@ -757,7 +757,7 @@ def process_gitea(conf, one_shot, domain_cache):
|
||||
}
|
||||
|
||||
# Send & mark
|
||||
send_to_rocket_chat(f"Gitea-{org_name}", "", [attachment], chat_url)
|
||||
send_to_rocket_chat(f"Gitea", "", [attachment], chat_url)
|
||||
mark_as_sent(sent_key, entry_id)
|
||||
log.info(
|
||||
"Sent: diffKind=%s diff=%s repo=%s title='%s'",
|
||||
@@ -1184,10 +1184,20 @@ def main():
|
||||
selected = {f.strip() for f in args.feeds.split(",") if f.strip()} if args.feeds else set()
|
||||
domain_cache = {}
|
||||
|
||||
sent_types = set()
|
||||
|
||||
for name, conf in FEED_CONFIG.items():
|
||||
if not conf.get("enabled"): continue
|
||||
if selected and name not in selected: continue
|
||||
send_startup_message(name, conf.get("chat_url"))
|
||||
if not conf.get("enabled"):
|
||||
continue
|
||||
if selected and name not in selected:
|
||||
continue
|
||||
|
||||
feed_type = conf.get("type")
|
||||
if feed_type in sent_types:
|
||||
continue
|
||||
|
||||
send_startup_message(feed_type, conf.get("chat_url"))
|
||||
sent_types.add(feed_type)
|
||||
|
||||
processors = {"bugzilla": process_bugzilla, "koji": process_koji, "wiki": process_wiki, "gitea": process_gitea}
|
||||
sleep_sec = max(1, args.sleep) * 60
|
||||
|
||||
Reference in New Issue
Block a user