Any idea how to fix this?
","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"I found a solution
\nproject = gl.projects.get(\"my-project\")\nmain_branch = project.protectedbranches.get(\"main\")\nproject.approvalrules.create(\n {\n \"name\": rule_name,\n \"approvals_required\": 1,\n \"rule_type\": \"regular\",\n \"protected_branch_ids\": [main_branch_id.id],\n \"group_ids\": approver_group_ids,\n }\n )\n-
|
I would like to automatically create a merge request approval rule. Any idea how to fix this? |
Beta Was this translation helpful? Give feedback.
-
|
I'm not sure if this is even supported by the GitLab API: https://archives.docs.gitlab.com/17.11/api/merge_request_approvals/#create-project-approval-rule |
Beta Was this translation helpful? Give feedback.
-
|
I found a solution |
Beta Was this translation helpful? Give feedback.
I found a solution