Skip to content

Commit

Permalink
Merge "Fix: On error continue processing workflows" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
eb-oss authored and Gerrit Code Review committed Feb 12, 2024
2 parents 4124ca4 + 68e8ac0 commit ed81c7c
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions src/gerrit_to_platform/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,16 @@ def find_and_dispatch(project: str, workflow_filter: str, inputs: Dict[str, str]
+ f"{inputs['GERRIT_CHANGE_NUMBER']} patch "
+ inputs["GERRIT_PATCHSET_NUMBER"]
)
dispatcher(
owner,
repo,
workflow["id"],
f"refs/heads/{inputs['GERRIT_BRANCH']}",
inputs,
)
try:
dispatcher(
owner,
repo,
workflow["id"],
f"refs/heads/{inputs['GERRIT_BRANCH']}",
inputs,
)
except Exception as e:
print(f"Failed to dispatch workflow: {e}")

magic_repo = get_magic_repo(platform)
if magic_repo:
Expand All @@ -152,13 +155,16 @@ def find_and_dispatch(project: str, workflow_filter: str, inputs: Dict[str, str]
+ f"{inputs['GERRIT_PATCHSET_NUMBER']} against "
+ f"{platform.value}:{owner}/{repo}"
)
dispatcher(
owner,
magic_repo,
workflow["id"],
"refs/heads/main",
inputs,
)
try:
dispatcher(
owner,
magic_repo,
workflow["id"],
"refs/heads/main",
inputs,
)
except Exception as e:
print(f"Failed to dispatch workflow: {e}")


def get_change_id(change: str) -> str:
Expand Down

0 comments on commit ed81c7c

Please sign in to comment.