Skip to main content

GitCode 平台代码洞察工具

Project description

GitCode Insight

Python Version License

GitCode 平台代码洞察命令行工具,支持社区洞察、Issue/PR 分析、仓库统计,生成可视化报告。

功能

功能 说明
社区洞察 分析组织下所有仓库的统计数据,生成看板
Issue 洞察 Issue 数量、响应时间、关闭率、标签分布
PR 洞察 评审效率、合并耗时、变更规模、冲突率
仓库统计 下载量、Fork、订阅用户、编程语言
综合报告 整合所有模块的一站式报告

快速开始

# 安装
pip install gitcode-insight

# 或从源码安装
git clone https://gitcode.com/gitcode-cli/insight.git
cd insight
python3 -m venv .venv
.venv/bin/pip install -e ".[test]"

# 创建配置文件
cp config/gitcode.json.example config/gitcode.json
# 编辑配置文件,填入 access_token 和 owner

# 生成社区看板
gc-insight dashboard

# 分析单个仓库
gc-insight issue --repo your-repo --token your_token --days 30
gc-insight pr --repo your-repo --token your_token --days 30
gc-insight repo-stats --repo your-repo --token your_token --days 30
gc-insight report --repo your-repo --token your_token --days 30

配置

配置文件 config/gitcode.json

{
    "access_token": "your_gitcode_access_token",
    "owner": "your_organization_name"
}

获取 Access Token:GitCode → 设置 → 访问令牌 → 创建新令牌

常见问题

Q: 输出文件在哪里? A: 默认保存在 ./output/ 目录。

Q: 请求频繁失败怎么办? A: GitCode API 每分钟限制 100 次请求,工具已内置限流处理。如遇问题,等待几分钟后重试。

Q: CSV 文件中文乱码? A: 文件使用 UTF-8-BOM 编码,Excel 可正常打开。

文档

许可证

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitcode_insight-0.1.0.tar.gz (53.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitcode_insight-0.1.0-py3-none-any.whl (47.1 kB view details)

Uploaded Python 3

File details

Details for the file gitcode_insight-0.1.0.tar.gz.

File metadata

  • Download URL: gitcode_insight-0.1.0.tar.gz
  • Upload date:
  • Size: 53.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gitcode_insight-0.1.0.tar.gz
Algorithm Hash digest
SHA256 65803fec8b4da5bf56abd2393431fb6907acc626a90b6ca1af2c631a6fc3782f
MD5 b93a72d365e7fce6a7dac08c33936c0e
BLAKE2b-256 bae7837e49937dfe399bc2ec92e573831fa55c96abf364b4f7eea513e9393c1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitcode_insight-0.1.0.tar.gz:

Publisher: build.yml on kerer-ai/insight

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gitcode_insight-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gitcode_insight-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2adca3cdaf54be2ed24986adb5fa005c39f9ab2aa837e4c400d98fef42851c9e
MD5 d086b00f81ebb6c7ef24199d532d0ac3
BLAKE2b-256 005294f796ae2c38cb594894d5b52cf8215a7f6e7a2f7e2faef27cce6851bde6

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitcode_insight-0.1.0-py3-none-any.whl:

Publisher: build.yml on kerer-ai/insight

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page