Skip to content

Conversation

@srikanthchelluri
Copy link
Contributor

The approvers API endpoint is deprecated [1]. GitLab instead uses
the approval_rules API endpoint to modify approval settings for
merge requests. This adds the functionality for project-level
merge request approval settings.

Note that there does not exist an endpoint to 'get' a single
approval rule at this moment - only 'list'.

[1] https://docs.gitlab.com/ee/api/merge_request_approvals.html

@max-wittig
Copy link
Member

@srikanthchelluri Thanks for this MR! Would you mind to also add some tests for this feature?

The `approvers` API endpoint is deprecated [1]. GitLab instead uses
the `approval_rules` API endpoint to modify approval settings for
merge requests. This adds the functionality for project-level
merge request approval settings.

Note that there does not exist an endpoint to 'get' a single
approval rule at this moment - only 'list'.

[1] https://docs.gitlab.com/ee/api/merge_request_approvals.html
@srikanthchelluri
Copy link
Contributor Author

@max-wittig Force pushed to fix merge conflicts.

It seems like merge request approvals aren't available in the community edition (which is what we're spinning up as part of the integration tests): https://gitlab.com/gitlab-org/gitlab/issues/20696

I added a few assertions to ee-test.py, but I don't have a private EE instance to test on. Any suggestions?

@max-wittig
Copy link
Member

@srikanthchelluri ee-test.py seems like the place to put this, yes. I also don't have an EE version to test.

@max-wittig max-wittig merged commit fddc25a into python-gitlab:master Oct 27, 2019
@srikanthchelluri srikanthchelluri deleted the project-approval-rules branch October 27, 2019 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants