AgentSkillsCN

get-commit-diffs

从 Azure DevOps Git 仓库中获取两次提交、分支或标签之间的差异摘要,返回新增、编辑与删除的文件列表。适用于为拉取请求提供高层次的变更概览。

SKILL.md
--- frontmatter
name: get-commit-diffs
description: >
  Fetch a summary of differences between two commits, branches, or tags in an
  Azure DevOps Git repository. Returns the list of added, edited, and deleted
  files. Use to get a high-level change overview for a pull request.

Get Commit Diffs

Platform Note

  • macOS/Linux: run .sh scripts
  • Windows: run .ps1 scripts with the same argument order

Run the get-commit-diffs.sh script on macOS/Linux or get-commit-diffs.ps1 on Windows to get a diff summary.

Arguments

#NameRequiredDescription
1organizationNoAzure DevOps organization (default: default_organization)
2projectYesProject name or ID
3repositoryIdYesRepository name or ID
4baseVersionYesBase version (commit SHA, branch, or tag)
5targetVersionYesTarget version (commit SHA, branch, or tag)
6baseVersionTypeNoBase version type: branch, commit, or tag (default: commit)
7targetVersionTypeNoTarget version type: branch, commit, or tag (default: commit)

Example

bash
# Compare two branches
bash .github/skills/get-commit-diffs/get-commit-diffs.sh default_organization MyProject MyRepo main feature/login branch branch
powershell
# Compare two branches (Windows)
.\github\skills\get-commit-diffs\get-commit-diffs.ps1 default_organization MyProject MyRepo main feature/login branch branch

Output

Returns JSON with changes array listing files with changeType and item.path, plus changeCounts summary.