mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 22:05:59 +00:00
fix(ci): keep commit lookup failures from blocking notices
This commit is contained in:
1 parent
b4a953c659
commit
51407155fc
2 files changed
+15
-2
No files matched your search
@@ -157,8 +157,11 @@ def sync(mode, repo, number, discord, sha="", apk="", release=""):
|
||||
{"content": retired_content(message["content"], pull.get("merged", False)),
|
||||
"allowed_mentions": {"parse": []}, "flags": 4})
|
||||
return
|
||||
commit = github(f"repos/{repo}/commits/{sha}")
|
||||
commit_message = commit.get("commit", {}).get("message", "")
|
||||
try:
|
||||
commit = github(f"repos/{repo}/commits/{sha}")
|
||||
except RuntimeError:
|
||||
commit = {}
|
||||
commit_message = (commit.get("commit") or {}).get("message", "")
|
||||
content = build_content(repo, number, pull["title"], sha, apk, release, pull.get("body"), commit_message)
|
||||
if len(content) > 1800:
|
||||
raise RuntimeError("Discord announcement is too long")
|
||||
|
||||
Reference in new issue
Block a user