fix(buildbot): add else to handle non start/success statuses
This commit is contained in:
parent
92b6c3618b
commit
affe16c605
2 changed files with 487 additions and 252 deletions
|
@ -9,6 +9,7 @@ def formatter(data, headers):
|
|||
reason = data["buildset"]["reason"]
|
||||
project = data["properties"]["project"][0]
|
||||
submittime = datetime.fromtimestamp(data["buildset"]["submitted_at"])
|
||||
# This could use some optimization, but it works for now.
|
||||
if buildstate == "starting":
|
||||
try:
|
||||
data["body"] = (
|
||||
|
@ -28,5 +29,13 @@ def formatter(data, headers):
|
|||
)
|
||||
except Exception as error:
|
||||
print(error)
|
||||
else:
|
||||
try:
|
||||
data["body"] = (
|
||||
f"###Buildbot job #{buildid} for {project} - {buildstate}\n\n"
|
||||
f"[view details]({buildlink})"
|
||||
)
|
||||
except Exception as error:
|
||||
print(error)
|
||||
|
||||
return data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue