# gitee_utils **Repository Path**: aodongbiao/gitee_utils ## Basic Information - **Project Name**: gitee_utils - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-12 - **Last Updated**: 2024-04-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Gitee_Utils ### 介绍 利用gitee_api实现如下功能: 1. 统计仓下各成员的issue数量 2. 统计仓下各成员的review意见数 利用命令行实现:统计成员代码行数 ### 使用 0. 到https://gitee.com/api/v5/swagger#申请token 1. 配置config.py,模板如下: ```python account_map={"username":"realname"} access_token="your token" owner="xxx" in "xxx/repo_name" repo="xxx" in "owner/xxx" ``` 1. 统计仓下各成员的issue数量:运行issue方法 1. 统计仓下各成员的review意见数:运行review方法 1. 统计各成员代码行数: ```shell git log --pretty=format:%ae --shortstat | awk ' /^$/ { author = "unknown"; next } /files? changed/ { insertions[author] += $4; deletions[author] += $6; } { author = $0 } END { printf("| %-30s | %10s | %10s | %10s |\n", "Author", "Effective", "Insertions", "Deletions"); printf("|%s|%s|%s|%s|\n", "--------------------------------", "----------", "----------", "----------"); for (a in insertions) { effective[a] = insertions[a] - deletions[a]; printf("| %-30s | %10d | %10d | %10d |\n", a, effective[a], insertions[a], deletions[a]); } } ' | sort -k4 -rn | column -t -s "|" ```