def __write_settings_file(url, username, password, authMethod, json):
data = {}
data['url'] = url.replace("/" + url.split('/')[-1], "")
data['project'] = url.split('/')[-1]
data['authMethod'] = authMethod
data['username'] = username
data['password'] = password
data['repo_id'] = {}
for project in json['value']:
data['repo_id'][project['name'].lower()] = project['id']
if not os.path.exists(click.get_app_dir("Codereview")):
os.makedirs(click.get_app_dir("Codereview"))
stream = open(Configuration.file_path, 'w')
yaml.dump(data, stream)
评论列表
文章目录