summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2022-07-28 21:01:41 -0700
committerJohn L. Villalovos <john@sodarock.com>2022-07-28 21:01:41 -0700
commit271f6880dbb15b56305efc1fc73924ac26fb97ad (patch)
treef6d9faa21e616d6f77f682e230c6c61395275130 /gitlab/v4/objects
parent69014e9be3a781be6742478af820ea097d004791 (diff)
downloadgitlab-271f6880dbb15b56305efc1fc73924ac26fb97ad.tar.gz
chore(topics): 'title' is required when creating a topic
In GitLab >= 15.0 `title` is required when creating a topic.
Diffstat (limited to 'gitlab/v4/objects')
-rw-r--r--gitlab/v4/objects/topics.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gitlab/v4/objects/topics.py b/gitlab/v4/objects/topics.py
index 57b104e..143759d 100644
--- a/gitlab/v4/objects/topics.py
+++ b/gitlab/v4/objects/topics.py
@@ -19,7 +19,10 @@ class TopicManager(CRUDMixin, RESTManager):
_path = "/topics"
_obj_cls = Topic
_create_attrs = RequiredOptional(
- required=("name",), optional=("avatar", "description")
+ # NOTE: The `title` field was added and is required in GitLab 15.0 or
+ # newer. But not present before that.
+ required=("name",),
+ optional=("avatar", "description", "title"),
)
_update_attrs = RequiredOptional(optional=("avatar", "description", "name"))
_types = {"avatar": types.ImageAttribute}