Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【开源自荐】code996 - 分析 Git 项目的编码工作强度 #2403

Closed
hellodigua opened this issue May 18, 2022 · 0 comments
Closed

【开源自荐】code996 - 分析 Git 项目的编码工作强度 #2403

hellodigua opened this issue May 18, 2022 · 0 comments

Comments

@hellodigua
Copy link

用途

  • 分析 Git 项目的 commit 提交时间数据
  • 入职新公司后了解项目是否存在 996 现象
  • 在上班的摸鱼时光找点乐子

如何使用

Mac 或 Linux 用户:

在 Git 项目的根目录,执行以下命令:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/hellodigua/code996/master/bin/code996.sh)"

Windows 用户:

下载该脚本 https://raw.githubusercontent.com/hellodigua/code996/master/bin/code996.sh

然后将该脚本移至要分析的 Git 项目目录,并执行以下命令:

sh code996.sh

项目截图

分析项目的基本情况:

通过图表查看 commit 提交分布:

对比项目工作时间类型:

它怎样工作

  1. 使用 git-log 对项目当前的分支进行查询,得到以小时汇总和以天汇总的 commit 统计结果
  2. 将本地脚本得到的查询结果转为 URL 参数,并打开 URL 到浏览器
  3. 从 URL 拿到数据,并使用一些规则处理,并将结果可视化展现

它安全吗

  1. 脚本端和 Web 端均不会收集任何数据
  2. 除分析的起始时间、commit 统计结果等通用数据外,URL 本身不泄露如项目名等敏感信息
  3. 所有代码均已开源,接受社区监督
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants