From 9d9db1de7f9c879bfb6c4721c4dfd853613d1278 Mon Sep 17 00:00:00 2001 From: Bhupesh-V Date: Mon, 24 Apr 2023 12:19:21 +0530 Subject: [PATCH] logic to update the yaml doc --- automod_updater/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/automod_updater/main.py b/automod_updater/main.py index 3b5a2e6..b922b85 100644 --- a/automod_updater/main.py +++ b/automod_updater/main.py @@ -53,4 +53,9 @@ for yaml_text in yaml_sections: for rule in rules: for key, value in rule.items(): - print("rule name: ", key) + if key == "New post comment": + rule[key]["comment"] = "This is a test comment" + new_content = ruamel.yaml.dump(rule[key], Dumper=ruamel.yaml.RoundTripDumper) + print(new_content) + # TODO: Update the wiki page with the new content +