|
| 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') |
|