DAS  3.0
Das Analysis System
gitlab_post_comment Namespace Reference

Variables

 iid = os.environ['CI_MERGE_REQUEST_IID']
 
 project = os.environ['CI_MERGE_REQUEST_PROJECT_PATH'].replace("/", "%2F")
 
 token = os.environ['GITLAB_API_TOKEN'];
 
string review_body = ""
 
 blob = parse.urlencode({'body': review_body.replace("\n", "\r\n").replace('"', '\"').encode('utf-8')})
 
 req = request.Request(f"https://gitlab.cern.ch/api/v4/projects/{project}/merge_requests/{iid}/notes", blob, headers={'PRIVATE-TOKEN': token})
 
 get_method
 
 response = request.urlopen(req)
 
 data = response.read().decode('utf-8')
 

Variable Documentation

◆ blob

blob = parse.urlencode({'body': review_body.replace("\n", "\r\n").replace('"', '\"').encode('utf-8')})

◆ data

data = response.read().decode('utf-8')

◆ get_method

get_method

◆ iid

iid = os.environ['CI_MERGE_REQUEST_IID']

◆ project

project = os.environ['CI_MERGE_REQUEST_PROJECT_PATH'].replace("/", "%2F")

◆ req

req = request.Request(f"https://gitlab.cern.ch/api/v4/projects/{project}/merge_requests/{iid}/notes", blob, headers={'PRIVATE-TOKEN': token})

◆ response

response = request.urlopen(req)

◆ review_body

string review_body = ""

◆ token

tuple token = os.environ['GITLAB_API_TOKEN'];