Skip to content

Yikun/reposcore

Repository files navigation

项目说明

给github和gitlab上面的工程评分, 基于criticality_score,增加了批量统计的功能

使用方法

设置GitHub Token:

export GITHUB_AUTH_TOKEN=<your access token>

如果你统计的项目里有GitLab的项目,还需要设置GitLab的Token:

准备工程的url列表文件,一行一个url, 格式可以参考本项目的projects.txt文件

git clone https://github.com/kunpengcompute/reposcore
cd reposcore
python3 setup.py install或pip install -e .

通过python3 setup.py install的方式安装完成后,会生成demo配置文件/etc/reposcore/reposcore.conf

通过pip install -e .方式安装的话,需要手动把本项目etc目录的reposcore.confdemo文件拷贝到/etc/reposcore/reposcore.conf中。

然后执行命令

reposcore --project-list projects_url_file --result-file result.csv

最终输出为csv格式的文件

Project Description

Score github or gitlab's projects, based on criticality_score, added batch function.

Usage

Before running, you need to setup Access Token to overcome the rate-limit of API calling:

For GitHub repos, you need to create a GitHub access token and set it in environment variable GITHUB_AUTH_TOKEN.

export GITHUB_AUTH_TOKEN=<your access token>

For GitLab repos, you need to create a GitLab access token and set it in environment variable GITLAB_AUTH_TOKEN.

Prepare a projects url file, one url per line, please refer to projects.txt

git clone https://github.com/kunpengcompute/reposcore
cd reposcore
python3 setup.py install or pip install -e .

If installed with python3 setup.py install command,there will be a demo configuration file: /etc/reposcore/reposcore.conf

If installed with pip install -e . command, you will have to copy the reposcore.conf demon configuration file under /etc/ to /etc/reposcore/reposcore.conf

Finally, run:

reposcore --project-list projects_url_file --result-file result.csv

The output file is in csv format.