diff --git a/main.py b/main.py index 24eeaf594a9af9bd05f57c74ecf855cff3e8914a..de8eecfcd44db4124d09fc39b48f2428c295cf3e 100644 --- a/main.py +++ b/main.py @@ -132,9 +132,8 @@ try: print(j_project['projects'][x]['owners'][y]['owner_name'] + '<' + j_project['projects'][x]['owners'][y]['owner_mail'] + '>' + ';') - c_user_tmp.append(j_project['projects'][x]['owners'][y]['owner_name'] + '<' + - j_project['projects'][x]['owners'][y]['owner_mail'] + '>' + ';') + j_project['projects'][x]['owners'][y]['owner_mail'] + '>' + ' ') print(c_user_tmp) # c_owners = j_project['projects'][x]['owners'] @@ -142,7 +141,7 @@ try: # for c_owner in c_owners: # c_user.append(c_owner['owner_name'] + ':' + c_owner['owner_mail']) c_project.append([project.attributes['id'], project.attributes['name_with_namespace'], - project.attributes['visibility'], lic, last_act, c_user_tmp]) + project.attributes['visibility'], lic, last_act, c_user_tmp[0]]) print(8*"-") except: print('Something wrong or Cant connect to GitLab server, check credential') @@ -174,18 +173,7 @@ with open('gitlab-projects.csv', 'w', encoding='UTF8', newline='') as f: # for project in projects: -# new_project_csv = [] -# new_project_csv.append(new_jproject) -# with open('gitlab-projects.json', encoding='utf8') as f: -# j_data = json.load(f) -# new_json_file_csv = pd.read_json(j_data, orient='index') -# # new_json_file_csv = pd.json_normalize(j_data, max_level=3) -# # flatten(j_project) -# df = pd.DataFrame(new_json_file_csv) -# df.to_csv("gitlab-projects.csv", encoding='utf-8', index=False) -# # with open("gitlab-projects.csv", "w", encoding='utf8') as outfile: -# # outfile.write(new_jproject_html) # print(new_csv) print("This is the end...")