Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting a list of commits/commit history from AWS CodeCommit repo

Is it possible right now, programatically to get a list of commits on an AWS CodeCommit repository?

I understand I can use the git command, but I am trying to get the repository information by using CodeCommit's API. Is that possible, or des the API not exist?

like image 544
chrisrhyno2003 Avatar asked Oct 13 '25 02:10

chrisrhyno2003


1 Answers

You can use:

aws codecommit get-branch --repository-name MyRepo --branch-name MyBranch

In order to get the commit ID of the branch.

Then you can call:

aws codecommit get-commit --repository-name MyRepo --commitId MyCommitID

to get the comment, author and parent commit ID. Iterating through the parent IDs you can get the history.

like image 51
david.perez Avatar answered Oct 15 '25 09:10

david.perez