Skip to content

Commit

Permalink
minor file md changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Eleni Ioakeim committed Jul 23, 2021
1 parent b16383f commit fa032c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ovisbot/extensions/ctf/ctf.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,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/'
Expand All @@ -975,7 +976,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")
})
Expand All @@ -1001,7 +1002,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)

Expand Down

0 comments on commit fa032c4

Please sign in to comment.