chrisrhyno2003
chrisrhyno2003

Reputation: 4177

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?

Upvotes: 4

Views: 4345

Answers (2)

david.perez
david.perez

Reputation: 7012

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.

Upvotes: 4

Paige Phillips
Paige Phillips

Reputation: 297

An API to directly get commit history is not currently available.

As a general rule, we don't comment on the future direction of the service, but we'd be interested in hearing the details of your use case.

Upvotes: 3

Related Questions