Get gitea rocket webhook parameters correct
This commit is contained in:
@@ -172,6 +172,7 @@ def send_to_rocket_chat(alias: str, text: str, attachments: Optional[List[Dict[s
|
||||
logging.exception("%s: failed to send to Rocket.Chat: %s", alias, e)
|
||||
|
||||
def send_startup_message(feed_name: str, chat_url: str):
|
||||
logging.info(f"Sent startup message to {feed_name}")
|
||||
send_to_rocket_chat(feed_name.capitalize(), f"{feed_name.capitalize()} integration started successfully.", None, chat_url)
|
||||
|
||||
# ---------------------------
|
||||
@@ -1184,20 +1185,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()
|
||||
sent_types = set()
|
||||
|
||||
for name, conf in FEED_CONFIG.items():
|
||||
if not conf.get("enabled"):
|
||||
continue
|
||||
if selected and name not in selected:
|
||||
continue
|
||||
for name, conf in FEED_CONFIG.items():
|
||||
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
|
||||
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)
|
||||
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