Checking the SDK works

So one of the most import things for this project is making sure it works with the AWS SDK libraries and I need to make sure that the libraries I could use did also have all the features needed to make this a worthwhile software application.

Thankfully anyone who works with AWS will know that the documentation they provide is a joy to work with in comparison to many other libraries.

To start with, the library I will be working with will be the Code commit one.

npm i @aws-sdk/client-codecommit

I know that I will have to deal with authentication in the future but for the testing code this can be hard coded into my application.

As the application is using the Angular framework the first thing to do is to build an angular service for interfacing to the library.

I have decided to call this the code-commit service, I know pretty plain.

This service is going to be responsible for all data coms with code commit.

So using the documentation I have thrown a few example calls into this service to make sure its working as expected.

List Repos, will get and list all available repositories that the user has permissions to list within the AWS account, returning the repo ID and Name.

Get Repo, this gives you a bit more detailed information specifically about the repository name that is passed, It also provides you the clone URL’s

Note to self, the clone URL’s will be good to allow users to click to clone
( like on github desktop )

Get Branches will return all branches on the origin, used later for simple swapping of branches.

Create Pull Request, now this is a key part of the application and it will allow the user to generate the pull requests from the application.

The request allows you to create a uuid for the PR so that they are not duplicated, and simply pass the repo name, source and destination and then the PR comments.

List pull requests, returns the PR’s for a repository in a particular state. I also checked that it matched what I could see on the AWS console.

Get pull request returns the detailed information about a specific PR.

So far so good for working with the API’s, all looks to be matching the documentation and I can certainly pull some useful information down for the user. For Now I will leave the service and start to actually look at designing and building the application. I will then come back to the service when a section of functionality needs it.

Next Up, Lets get it looking like an app and stop just using the console.

If this is sounding interesting to you please do join my mailing list newsletter.

Success! You're on the list.

Categories: ezConsole

Tags: , , , , , , , , , ,

1 reply


  1. Getting the pull requests –

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: