From e3b5d27bde3e104e520d976795cbcb1ae792fb05 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 5 Nov 2021 22:40:35 -0700 Subject: [PATCH] docs: add links to the GitLab API docs Add links to the GitLab API docs for merge_requests.py as it contains code which spans two different API documentation pages. --- gitlab/v4/objects/merge_requests.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gitlab/v4/objects/merge_requests.py b/gitlab/v4/objects/merge_requests.py index 3b0d269a1..a26a6cb18 100644 --- a/gitlab/v4/objects/merge_requests.py +++ b/gitlab/v4/objects/merge_requests.py @@ -1,3 +1,8 @@ +""" +GitLab API: +https://docs.gitlab.com/ee/api/merge_requests.html +https://docs.gitlab.com/ee/api/merge_request_approvals.html +""" from gitlab import cli from gitlab import exceptions as exc from gitlab import types @@ -253,6 +258,8 @@ def approve(self, sha=None, **kwargs): Raises: GitlabAuthenticationError: If authentication is not correct GitlabMRApprovalError: If the approval failed + + https://docs.gitlab.com/ee/api/merge_request_approvals.html#approve-merge-request """ path = f"{self.manager.path}/{self.get_id()}/approve" data = {} @@ -273,6 +280,8 @@ def unapprove(self, **kwargs): Raises: GitlabAuthenticationError: If authentication is not correct GitlabMRApprovalError: If the unapproval failed + + https://docs.gitlab.com/ee/api/merge_request_approvals.html#unapprove-merge-request """ path = f"{self.manager.path}/{self.get_id()}/unapprove" data = {}