Right now ucascade checks the approvals_left value right after approving the MR. In case the MR needs multiple approvals, this might not give enough time for Gitlab to report the correct value, as the MR might still be in approvals_syncing status. This results in the MR getting stuck open due to missing approvals.
What we should do is to move the isMergeRequestApproved check to after the waiting loop for the MR being ready.
Right now ucascade checks the
approvals_leftvalue right after approving the MR. In case the MR needs multiple approvals, this might not give enough time for Gitlab to report the correct value, as the MR might still be inapprovals_syncingstatus. This results in the MR getting stuck open due to missing approvals.What we should do is to move the isMergeRequestApproved check to after the waiting loop for the MR being ready.