Skip to content

为了提高 openclaw/skills 翻译效率的 commit 记录 -> 翻译/处理任务的定制程序。

License

Notifications You must be signed in to change notification settings

AgentWorkers/gitdiffs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitdiffs

A CLI tool to compare two commits in a GitHub repository and output the file changes in JSON format.

Installation

Pre-built Binaries

Download from GitHub Releases:

tar -xzf gitdiffs-x86_64-linux.tar.gz
sudo mv gitdiffs /usr/local/bin/

From Source

git clone https://github.com/yourusername/gitdiffs.git
cd gitdiffs
cargo build --release

The binary will be available at ./target/release/gitdiffs.

Usage

gitdiffs <repo_url> <base_commit> <head_commit>

Arguments

Argument Description
repo_url GitHub repository URL (e.g., https://github.com/owner/repo)
base_commit The base commit SHA
head_commit The head commit SHA to compare against

Example

gitdiffs https://github.com/openclaw/skills f4af0de88dbafb399d7316f0b0d287169785ceee 05166e30a79b6824db300d4d069bc1e79408eaea

Output

{
  "repo": "openclaw/skills",
  "base": "f4af0de88dbafb399d7316f0b0d287169785ceee",
  "head": "05166e30a79b6824db300d4d069bc1e79408eaea",
  "files": [
    {
      "status": "ADD",
      "path": "skills/guohongbin-git/zhihu-hot-cn/README.md"
    },
    {
      "status": "ADD",
      "path": "skills/guohongbin-git/zhihu-hot-cn/SKILL.md"
    }
  ]
}

Status Mapping

GitHub API Status Output Status
added ADD
modified ADD
removed DEL
renamed DEL + ADD (two entries)

Authentication

Set the GITHUB_TOKEN environment variable to authenticate with GitHub API:

export GITHUB_TOKEN=your_github_token
gitdiffs https://github.com/owner/repo base_sha head_sha

Rate Limits

  • Without token: 60 requests/hour
  • With token: 5,000 requests/hour

Getting a GitHub Token

  1. Go to https://github.com/settings/tokens
  2. Click "Generate new token (classic)"
  3. Select scopes: public_repo for public repos, repo for private repos
  4. Generate and copy the token

License

MIT

About

为了提高 openclaw/skills 翻译效率的 commit 记录 -> 翻译/处理任务的定制程序。

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages