Commit 4820c476 authored by Daniel Stone's avatar Daniel Stone
Browse files

Ensure project has issues enabled

Check if the target GitLab project actually has issues enabled, and
enable them before attempting to import if not.

Reported by @ajax.
parent b7296ee0
......@@ -358,7 +358,7 @@ def options():
def check_if_target_project_exists(target):
try:
target.get_project()
project = target.get_project()
except Exception as e:
print("ERROR: Could not access the project `{}` - are you sure \
it exists?".format(target.target_project))
......@@ -367,6 +367,11 @@ def check_if_target_project_exists(target):
product name.")
exit(1)
if not project.issues_enabled:
print("Enabling issues for GitLab project")
project.issues_enabled = 1
project.save()
def main():
args = options()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment