mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 15:57:53 +00:00
test
This commit is contained in:
parent
2cedff5390
commit
35dfe8d86c
1 changed files with 6 additions and 3 deletions
|
|
@ -31,7 +31,6 @@ def report_status(sha, name, start_time, exit=None):
|
|||
data = {
|
||||
'name': name,
|
||||
'head_sha': sha,
|
||||
'status': status,
|
||||
'started_at': start_time,
|
||||
'output': {
|
||||
'title': name,
|
||||
|
|
@ -43,6 +42,10 @@ def report_status(sha, name, start_time, exit=None):
|
|||
|
||||
if exit is not None:
|
||||
data['completed_at'] = datetime.datetime.now(tz=datetime.timezone.utc).isoformat(timespec='seconds')
|
||||
data['completion'] = status
|
||||
data['status'] = 'completed'
|
||||
else:
|
||||
data['status'] = status
|
||||
|
||||
req = urllib.request.Request(
|
||||
f"https://api.github.com/repos/pluralkit/pluralkit/check-runs",
|
||||
|
|
@ -63,7 +66,7 @@ def report_status(sha, name, start_time, exit=None):
|
|||
except urllib.error.HTTPError as e:
|
||||
response_code = e.getcode()
|
||||
response_data = e.read()
|
||||
print(f"{response_code} failed to update status {name}: {response_data}")
|
||||
print(f"{response_code} failed to update status {data}: {response_data}")
|
||||
global global_fail
|
||||
global_fail = True
|
||||
|
||||
|
|
@ -84,7 +87,7 @@ def main():
|
|||
return 1
|
||||
|
||||
data = json.loads(dispatch_data)
|
||||
print("running {dispatch_data}")
|
||||
print(f"running {dispatch_data}")
|
||||
|
||||
time_started = datetime.datetime.now(tz=datetime.timezone.utc).isoformat(timespec='seconds')
|
||||
report_status(data['sha'], data["action"], time_started)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue