From f475d33ff7b39320e743ae41405498ab1cebbc86 Mon Sep 17 00:00:00 2001 From: Eleni Ioakeim Date: Fri, 23 Jul 2021 20:52:32 +0300 Subject: [PATCH] minor file md changes --- ovisbot/extensions/ctf/ctf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ovisbot/extensions/ctf/ctf.py b/ovisbot/extensions/ctf/ctf.py index d65bdba..c92ac18 100644 --- a/ovisbot/extensions/ctf/ctf.py +++ b/ovisbot/extensions/ctf/ctf.py @@ -921,6 +921,7 @@ async def check_reminders(self): except CTF.DoesNotExist: continue + # TODO Make async somehow to avoid request stall def pushToGitHub(self,ctf_name,challenge_name): pinsDir = os.path.abspath(os.getcwd()) + '/pins/' @@ -930,7 +931,7 @@ def pushToGitHub(self,ctf_name,challenge_name): token = self.bot.config_cls.GITHUB_TOKEN message = json.dumps({ - "message":"add pins for challenge " + challenge_name + " of ctf " + ctf_name, + "message":"store pins of challenge " + challenge_name + " from " + ctf_name + " ctf.", "branch": "main", "content": file.decode("utf-8") }) @@ -956,7 +957,8 @@ async def harvestPins(channel): if(len(attachs) != 0): for a in attachs: await a.save(os.path.join(pinsDir, a.filename)) - f.write("check file " + a.filename + " in this directory." + os.linesep) + file = "[" + a.filename + "]" + "(./" + a.filename + ")" + f.write(os.linesep + file + os.linesep) f.write(os.linesep + "---" + os.linesep)