Gitlab: Don't try to delete "report_approver" type when "gitLabIgnoreApprovals" is activated #27950
nicolas-urbantz
started this conversation in
Suggest an Idea
Replies: 3 comments 3 replies
-
Is your solution to:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I would apply more filtering. Because if we hide the error triggered by the Also, adding a filter means less API call (that we know will fail anyway...) |
Beta Was this translation helpful? Give feedback.
3 replies
-
I hope it's good enough :) => #27963 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Tell us more.
Hello,
I'm running into a blocker while I'm using renovate. Here is the context:
We are using gitlab and we want to activate the "automerge" on some PR. The problem is that we also activated the "report_approver" rule that can't be deleted through an API call (see documentation.
The good news is that, by putting renovate bot in the "report_approver" group and by asking it to
autoApprove=true
, our MR's can be auto merge :) BUT we also have another rule saying "we need 2 approvals", that should be removed.I've checked in the code, and it seems we try to delete rules that we can't here:
And it's only AFTER this loop that we set
approvals_required: 0
.So my idea would be to add filters in
existingRegularApproverRules
so that it doesn't fail onawait gitlabApi.deleteJson(
${url}/${rule.id});
, so that the code that putapprovals_required: 0
is reached.What do you think?
ps: I can propose a MR if you are ok with the idea
Beta Was this translation helpful? Give feedback.
All reactions