mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-11 14:54:00 +00:00
Surround commits under try-except block (#3974)
* Surround `commits` under try-except block * Directly return instead of setting variable to 0 * Update ci.py
This commit is contained in:
8
ci.py
8
ci.py
@@ -45,8 +45,12 @@ def send_artifact_to_telegram_chat(chat_id):
|
||||
def send_internal_notifications():
|
||||
repository = git.Repo(".")
|
||||
commit_range = f"{github_event_before}...{github_sha}"
|
||||
commits = list(repository.iter_commits(commit_range))
|
||||
|
||||
try:
|
||||
commits = list(repository.iter_commits(commit_range))
|
||||
except git.exc.GitCommandError as error:
|
||||
print(f"Error fetching commits: {error}")
|
||||
return
|
||||
|
||||
if len(commits) == 0: return
|
||||
|
||||
overview_link = f"https://github.com/{github_repository}/compare/{commit_range}"
|
||||
|
||||
Reference in New Issue
Block a user