1 Answer
- Newest
- Most votes
- Most comments
0
I would suggest using git commands to pull this information.
The git diff
subcommand supports a --stat
argument which will give you the summary of changes, with the number of changed files, along with the number of lines added, modified, or deleted.
Here are some examples, using the aws-cdk repo:
- Changes between most recent commit and previous commit:
$ git diff --stat HEAD^1..HEAD
packages/@aws-cdk/aws-customerprofiles/package.json | 1 +
packages/@aws-cdk/aws-groundstation/package.json | 1 +
packages/@aws-cdk/aws-lookoutmetrics/package.json | 1 +
3 files changed, 3 insertions(+)
- Changes between two tagged releases:
$ git diff --stat v2.68.0..v2.69.0
(I have omitted the first bit of the output here for brevity)
packages/cdk-assets/test/docker-images.test.ts | 139 +++++
tools/@aws-cdk/eslint-plugin/lib/rules/invalid-cfn-imports.ts | 2 +-
tools/@aws-cdk/individual-pkg-gen/transform-packages.ts | 6 +-
tools/@aws-cdk/pkglint/lib/rules.ts | 24 -
tools/@aws-cdk/prlint/test/module.test.ts | 3 -
version.v2.json | 4 +-
400 files changed, 10821 insertions(+), 7443 deletions(-)
As you can see, this gives you the total changes in summary, and also shows you a breakdown per file.
[1] https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---statltwidthgtltname-widthgtltcountgt
Relevant content
- asked a year ago
- asked 6 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 4 years ago
Thanks for response. But i'm looking for a solution with which i can get the diff info from REST APIs.