summaryrefslogtreecommitdiff
path: root/docs/gl_objects
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2018-06-09 18:08:38 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2018-06-09 18:08:38 +0200
commit8873edaeebd18d6b2ed08a8609c011ad29249b48 (patch)
treecfc3674a94211996646b83f9666e812af94a4843 /docs/gl_objects
parent39c8ad5a9405469370e429548e08aa475797b92b (diff)
downloadgitlab-8873edaeebd18d6b2ed08a8609c011ad29249b48.tar.gz
Add support for issue links (EE)
Fixes #422
Diffstat (limited to 'docs/gl_objects')
-rw-r--r--docs/gl_objects/geo_nodes.rst2
-rw-r--r--docs/gl_objects/issues.rst38
2 files changed, 39 insertions, 1 deletions
diff --git a/docs/gl_objects/geo_nodes.rst b/docs/gl_objects/geo_nodes.rst
index 44ed391..181ec91 100644
--- a/docs/gl_objects/geo_nodes.rst
+++ b/docs/gl_objects/geo_nodes.rst
@@ -11,7 +11,7 @@ Reference
+ :class:`gitlab.v4.objects.GeoNodeManager`
+ :attr:`gitlab.Gitlab.geonodes`
-* GitLab API: https://docs.gitlab.com/ee/api/geo_nodes.html
+* GitLab API: https://docs.gitlab.com/ee/api/geo_nodes.html (EE feature)
Examples
--------
diff --git a/docs/gl_objects/issues.rst b/docs/gl_objects/issues.rst
index 0a6b254..7abaa78 100644
--- a/docs/gl_objects/issues.rst
+++ b/docs/gl_objects/issues.rst
@@ -159,3 +159,41 @@ Get the list of merge requests that will close an issue when merged::
Get the list of participants::
users = issue.participants()
+
+Issue links
+===========
+
+Reference
+---------
+
+* v4 API:
+
+ + :class:`gitlab.v4.objects.ProjectIssueLink`
+ + :class:`gitlab.v4.objects.ProjectIssueLinkManager`
+ + :attr:`gitlab.v4.objects.ProjectIssue.links`
+
+* GitLab API: https://docs.gitlab.com/ee/api/issue_links.html (EE feature)
+
+Examples
+--------
+
+List the issues linked to ``i1``::
+
+ links = i1.links.list()
+
+Link issue ``i1`` to issue ``i2``::
+
+ data = {
+ 'target_project_id': i2.project_id,
+ 'target_issue_iid': i2.iid
+ }
+ src_issue, dest_issue = i1.links.create(data)
+
+.. note::
+
+ The ``create()`` method returns the source and destination ``ProjectIssue``
+ objects, not a ``ProjectIssueLink`` object.
+
+Delete a link::
+
+ i1.links.delete(issue_link_id)