Jpp  debug
the software that should make you happy
create_update_issues.py
Go to the documentation of this file.
1 import gitlab
2 import os
3 
4 origin = "https://git.km3net.de"
5 # Private token is set as an env var
6 private_token = os.getenv("PRIVATE_TOKEN")
7 gl = gitlab.Gitlab(origin, private_token, api_version='4')
8 gl.auth()
9 
10 projects_to_notificate = [
11  451, # km3io
12  223, # Jpp
13  184, # aanet
14  470, # KM3io.jl
15  679, # KM3NeT TestData
16  292, # km3sim
17  314, # gSeaGen
18 ]
19 
20 for project_id in projects_to_notificate:
21  project = gl.projects.get(project_id, lazy=True)
22 
23  issue = project.issues.create({
24  'title':
25  'New KM3NeT Dataformat Release {}'.format(os.getenv("CI_COMMIT_TAG")),
26  'description':
27  "There is a new version of the KM3NeT Dataformat available, "
28  "please update!"
29  "\n\nhttps://git.km3net.de/common/km3net-dataformat/-/tags",
30  })
31  issue.labels = ['io', 'todo']
32  issue.save()