Update bot.py

Signed-off-by: Matt C <matthew.compton@mymail.champlain.edu>
pull/1/head
Matt C 2 years ago committed by GitHub
parent 42fb3ad6d1
commit 2a89918cf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,5 @@
from github import Github
import datetime
import sys
g = Github(open(".access_token").read().strip())
@ -6,7 +7,7 @@ g = Github(open(".access_token").read().strip())
def post_update(text):
repo = g.get_repo("crystalrfc-bot/status")
thread = repo.get_issue(1)
thread.create_comment(text + "\n Beep Boop! (I'm a bot, and this action was performed automagically.)")
thread.create_comment(text + "\nBeep Boop! (I'm a bot, and this action was performed automagically.)\nScan timestamp: `" + datetime.datetime.now().isoformat() + "`")
targets = ['crystal-linux/.github', 'crystal-linux-packages/.github']
@ -55,4 +56,4 @@ for tgt in targets:
if status_text == "":
status_text = "Something has gone wrong! No actions were taken at *all*!"
post_update(status_text)
post_update(status_text)

Loading…
Cancel
Save