5 response.raise_for_status()
8 r = requests.get(url +
"projects",headers={
"PRIVATE-TOKEN":token})
11 matches = [proj_dict
for proj_dict
in proj_list
if proj_dict[
"path_with_namespace"] == project_name]
13 print "more than one project found matching the given project path"
14 print "going to use the first one"
15 return matches[0][
"id"]
18 r = requests.get(url +
"projects/{0}/merge_requests".format(project_id),headers={
"PRIVATE-TOKEN":token})
21 matches = [mr_dict
for mr_dict
in mr_list
if mr_dict[
"iid"] == mr_iid]
23 print "more than one merge request found matching the given project path and merge request IID"
24 print "going to use the first one"
25 return matches[0][
"id"]