lots of typing fixes
This commit is contained in:
parent
51f580a304
commit
3665c34961
43 changed files with 260 additions and 178 deletions
|
@ -19,7 +19,10 @@ class BlockBridgeGitHubAutomation(BaseAutomation):
|
|||
g = Github(app.config['GITHUB_API_KEY'])
|
||||
repo = g.get_repo(app.config['GITHUB_BRIDGE_REPO'])
|
||||
for vp in app.config['GITHUB_BRIDGE_VANTAGE_POINTS']:
|
||||
results = repo.get_contents(f"recentResult_{vp}").decoded_content.decode('utf-8').splitlines()
|
||||
contents = repo.get_contents(f"recentResult_{vp}")
|
||||
if isinstance(contents, list):
|
||||
return False, f"Expected a file at recentResult_{vp} but got a directory."
|
||||
results = contents.decoded_content.decode('utf-8').splitlines()
|
||||
for result in results:
|
||||
parts = result.split("\t")
|
||||
if isoparse(parts[2]) < (datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(days=3)):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue