Via Python and the gitlab api (python-gitlab module), I am trying to update the tag_list information of my repository (not the tag information). Unfortunately, it seems the information is ignored. I tried updating the tag_list information in an existing repository and also tried creating a new one with tag_list information included. Below simplified code snippets for both try outs:
-
def update_repo(self,export_keywords):
gl = gitlab.Gitlab(‘https://gitlab.ourserver.com’, ‘mytoken’)
projects = gl.projects.search(‘my_repository’)
assert(projects.sizeof() > 0), “Project not found!”
project = projects[0]
project.tag_list = export_keywords
project.save()
# or as an alternative:
# ret = gl.update(project, tag_list=export_keywords)
print(ret[‘tag_list’])
def create_repo():
gl = gitlab.Gitlab(‘https://gitlab.ourserver.com’, ‘mytoken’)
data = {‘name’:‘my_new_repo’,‘tag_list’:(‘keyword1’,‘keyword2’)}
gl.projects.create(data)
I am wondering if the gitlab server anyhow is capable of accepting changes specific to the tag_list information at all? If so, I am very interested to know how to implement it.
Thanks in advance!