Skip to content
Snippets Groups Projects
Commit ceb8059a authored by jurgenhaas's avatar jurgenhaas
Browse files

Move fixes towards API v4

parent a8d4485e
No related branches found
Tags v0.1.0
No related merge requests found
......@@ -187,8 +187,8 @@ def main():
return
# Validate if project exists and get its ID
project = GitLabProject(module, git) # type: gitlab.Project
project_exists = project.exists(group_name, project_name)
metaProject = GitLabProject(module, git) # type: GitLabProject
project_exists = metaProject.exists(group_name, project_name)
if not project_exists:
module.fail_json(msg="Gitlab project does not exist")
......@@ -201,7 +201,7 @@ def main():
# Validate if milestone exists and get its ID
milestone = GitLabMilestone(module, git)
milestone_exists = milestone.exists(project.pid, milestone_name)
milestone_exists = milestone.exists(metaProject.pid, milestone_name)
milestone_id = None
if milestone_exists:
milestone_id = milestone.mid
......@@ -211,7 +211,7 @@ def main():
labels = []
if update:
issues = project.findIssues(title)
issues = metaProject.findIssues(title)
updated = 0
if issues:
issue = None # type: gitlab.ProjectIssue
......@@ -256,7 +256,7 @@ def main():
time.sleep(delay)
delay *= 2
try:
issue = project.issues.create(arguments) # type: gitlab.Issue
issue = metaProject.project.issues.create(arguments) # type: gitlab.Issue
except Exception, e:
pass
if issue:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment