Closed geeklx closed 1 year ago
""" File name : config.py Author : miaoyc Create date : 2021/9/28 1:38 下午 Description : 配置模板 """
import datetime
git_root_url = "https://gitlab.com/geeklx/fsjxappkuangjia.git"
git_token = "xxx"
export_path = "./dist"
t_from = "2010-9-1"
t_end = "2022-2-1"
date_from = datetime.datetime.strptime(t_from,'%Y-%m-%d')
date_end = datetime.datetime.strptime(t_end,'%Y-%m-%d')
valid_project = [ ]
结果:
Android Open Source Project / platform / external / Libkmsxx 2022-03-08T04:43:23 gitlab-qa-sandbox-group / qa-test-2022-03-08-04-07-08-5c30fbae33da1195 / project-with-ci-cd-defda69f0d13a281 2022-03-08T04:43:21 Hugefiver / greenplum-db 2022-03-08T04:43:20 Android Open Source Project / platform / external / Libnl 2022-03-08T04:43:19 Android Open Source Project / platform / external / Fsverity Utils 2022-03-08T04:43:12 Android Open Source Project / platform / external / Junit Params 2022-03-08T04:43:12 Android Open Source Project / platform / external / Igt Gpu Tools 2022-03-08T04:43:11 Android Open Source Project / platform / external / google-fonts / Fraunces 2022-03-08T04:43:11 Android Open Source Project / platform / external / Jimfs 2022-03-08T04:43:11 CAS-eResearch / GWDC / Code / gwcloud_react_host 2022-03-08T04:43:10 Adam Alvis / GitLab 2022-03-08T04:43:08 Naohide Sano / vavi-sound-nda 2022-03-08T04:43:05 Balu uses @balasankarc for work. / omnibus-gitlab 2022-03-08T04:42:53 haiwei-li / study 2022-03-08T04:42:52 Android Open Source Project / platform / external / Ant Glob 2022-03-08T04:42:51 GitLab.org / GitLab 2022-03-08T04:42:47 Renato Aguiar / openbsd 2022-03-08T04:42:46 ./dist/GitStatic_2010-9-1/total_2010-9-1.csv
Process finished with exit code 0
valid_project变量里面是待统计项目的白名单,从问题描述看,valid_project是空,自然什么都没有统计到
@geeklx 兄弟你把token也发出来了,我帮你注释掉了😂
!/usr/bin/env python
-- coding: utf-8 --
""" File name : config.py Author : miaoyc Create date : 2021/9/28 1:38 下午 Description : 配置模板 """
import datetime
gitlab_url = "https://gitlab.com/geeklx/fsjxappkuangjia.git" # GitLab 地址
private_token = "xxx" # GitLab Access Tokens(管理员权限)
gitlab仓库地址
git_root_url = "https://gitlab.com/geeklx/fsjxappkuangjia.git"
访问Token
git_token = "xxx"
统计结果的存储目录
export_path = "./dist"
统计的时间区间-开始日期
t_from = "2010-9-1"
统计的时间区间-结束日期
t_end = "2022-2-1"
统计的时间区间-开始日期,datetime对象
date_from = datetime.datetime.strptime(t_from,'%Y-%m-%d')
统计的时间区间-结束日期,datetime对象
date_end = datetime.datetime.strptime(t_end,'%Y-%m-%d')
待统计的仓库列表
valid_project = [ ]
结果:
Android Open Source Project / platform / external / Libkmsxx 2022-03-08T04:43:23 gitlab-qa-sandbox-group / qa-test-2022-03-08-04-07-08-5c30fbae33da1195 / project-with-ci-cd-defda69f0d13a281 2022-03-08T04:43:21 Hugefiver / greenplum-db 2022-03-08T04:43:20 Android Open Source Project / platform / external / Libnl 2022-03-08T04:43:19 Android Open Source Project / platform / external / Fsverity Utils 2022-03-08T04:43:12 Android Open Source Project / platform / external / Junit Params 2022-03-08T04:43:12 Android Open Source Project / platform / external / Igt Gpu Tools 2022-03-08T04:43:11 Android Open Source Project / platform / external / google-fonts / Fraunces 2022-03-08T04:43:11 Android Open Source Project / platform / external / Jimfs 2022-03-08T04:43:11 CAS-eResearch / GWDC / Code / gwcloud_react_host 2022-03-08T04:43:10 Adam Alvis / GitLab 2022-03-08T04:43:08 Naohide Sano / vavi-sound-nda 2022-03-08T04:43:05 Balu uses @balasankarc for work. / omnibus-gitlab 2022-03-08T04:42:53 haiwei-li / study 2022-03-08T04:42:52 Android Open Source Project / platform / external / Ant Glob 2022-03-08T04:42:51 GitLab.org / GitLab 2022-03-08T04:42:47 Renato Aguiar / openbsd 2022-03-08T04:42:46 ./dist/GitStatic_2010-9-1/total_2010-9-1.csv
Process finished with exit code 0