diff options
| author | Gauvain Pocentek <gauvain@pocentek.net> | 2018-01-01 15:44:47 +0100 |
|---|---|---|
| committer | Gauvain Pocentek <gauvain@pocentek.net> | 2018-01-01 15:44:47 +0100 |
| commit | fa520242b878d25e37aacfcb0d838c58d3a4b271 (patch) | |
| tree | 2d63086ba96dd02765359591beab77960bf3e844 /docs/gl_objects/projects.rst | |
| parent | f5850d950a77b1d985fdc3d1639e2627468d3548 (diff) | |
| download | gitlab-fa520242b878d25e37aacfcb0d838c58d3a4b271.tar.gz | |
Add support for project and group custom variables
implements parts of #367
Diffstat (limited to 'docs/gl_objects/projects.rst')
| -rw-r--r-- | docs/gl_objects/projects.rst | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst index aaf0699..b7c5d78 100644 --- a/docs/gl_objects/projects.rst +++ b/docs/gl_objects/projects.rst @@ -172,6 +172,41 @@ Get a list of users for the repository: :start-after: # users list :end-before: # end users list +Project custom attributes +========================= + +Reference +--------- + +* v4 API: + + + :class:`gitlab.v4.objects.ProjectCustomAttribute` + + :class:`gitlab.v4.objects.ProjectCustomAttributeManager` + + :attr:`gitlab.v4.objects.Project.customattributes` + +* GitLab API: https://docs.gitlab.com/ce/api/custom_attributes.html + +Examples +-------- + +List custom attributes for a project:: + + attrs = project.customattributes.list() + +Get a custom attribute for a project:: + + attr = project.customattributes.get(attr_key) + +Set (create or update) a custom attribute for a project:: + + attr = project.customattributes.set(attr_key, attr_value) + +Delete a custom attribute for a project:: + + attr.delete() + # or + project.customattributes.delete(attr_key) + Project files ============= |
