360 Secure SkillHub
360 安全技能中心

gitlab-commit-report

核心功能:通过已登录Chrome会话调用GitLab Group接口,分页采集指定日期push事件,去重存储原始JSON数据;按需生成Markdown日报,含提交次数、活跃人数、提交者及仓库排行等统计。典型场景:用户要求采集当日提交、生成今日/指定日期提交报告时使用。输入为命令行指令,输出为指定目录下的JSON原始数据文件和Markdown报告,需提前配置GitLab地址及组信息。

bondli
bondli
热度 47.01
最近更新 2026-05-11 17:35:58
分类:数据依赖:代码执行 / 联网浏览搜索 / 读写文件 / 第三方 API应用场景:数据处理 / 报告撰写 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add gitlab-commit-report
Metadata
name
gitlab-commit-report
description
GitLab group push events collector and daily commit report generator

GitLab Commit Report

从 GitLab Group 的 activity 接口采集代码提交数据,支持分页拉取当天全量数据,并按需生成任意日期的提交日报。

What this skill does

This skill will:

  1. Connect to an existing Chrome browser session (with GitLab logged in)
  2. Call GitLab Group Activity API with pagination (/groups/:groupId/-/activity?limit=20&offset=N)
  3. Parse HTML response to extract push events: author, repository, commit id, commit message, timestamp
  4. Stop paginating when events older than today are encountered
  5. Merge new events into ~/openclaw-skill-data/gitlab-commit-report/YYYY-MM-DD.json with commit id deduplication
  6. On demand: aggregate statistics for any date and generate a Markdown report

Usage

When the user asks something like:

  • 采集 GitLab 今天的提交数据
  • 拉取今天的代码提交记录
  • 生成 GitLab 提交日报
  • 生成今天的代码提交报告
  • 生成某天的提交报告,比如 2026-03-18

Run:

# 采集今天的 push events(配合 cron 每小时执行)
node dist/index.js collect

# 生成今日日报
node dist/index.js report

# 生成指定日期日报
node dist/index.js report 2026-03-18

Output

The skill will generate:

~/openclaw-skill-data/gitlab-commit-report/YYYY-MM-DD.json    # 当天所有 push 事件原始数据(增量去重追加)
~/openclaw-skill-data/gitlab-commit-report/YYYY-MM-DD.md      # 指定日期提交日报

Configuration

Copy config.example.json to ~/openclaw-skill-data/gitlab-commit-report/config.json and fill in:

{
  "gitlabUrl": "https://git.corp.kuaishou.com",
  "groupId": "your-group-path",
  "groupName": "我的团队"
}

Report Content

  • 概览:提交总次数、活跃提交人数、涉及仓库数
  • Top 10 提交者排行
  • Top 5 活跃仓库排行