Skip to content
Snippets Groups Projects

mrhlpr: mr: use a simpler mechanism to detect if user approved a MR

Merged Clayton Craft requested to merge craftyguy/fix_approval_fetch into master
All threads resolved!
+ 2
2
@@ -550,13 +550,13 @@ def finish(
print("Skipping approval...")
else:
if mr.approvals.get().attributes["user_has_approved"]:
print("MR had already been approved by you!")
print("MR has already been approved by you!")
else:
print("Approving MR...")
try:
mr.approve(git.sha())
except Exception as e:
raise RuntimeError("Approving failed, and MR not yet approved") from e
raise RuntimeError("Approval failed") from e
if comment:
print("Adding the comment...")
Loading