Repository navigation
feat(codecommit): allow initializing a Repository with contents - #17968
Conversation
Co-authored-by: Ben Chaimberg <[email protected]>
| @@ -0,0 +1 @@ | |||
| # Test No newline at end of file | |||
There was a problem hiding this comment.
There was a problem hiding this comment.
Let's call this something like test-file.txt then. Not README.md 😃.
There was a problem hiding this comment.
@skinny85 it is a README to easily verify its existence when clicking on the codecommit repo, but I can rename it :)
skinny85
left a comment
There was a problem hiding this comment.
Thanks for the contribution @LukvonStrom! It's a great start, but I feel like we need to iterate on the API a little bit more before merging this in.
| @@ -0,0 +1 @@ | |||
| # Test No newline at end of file | |||
| path: path.join(__dirname, 'directory/'), | ||
| }); | ||
|
|
||
| const repo = new Repository(this, 'Repository', { |
There was a problem hiding this comment.
Code here should use the codecommit prefix (see examples above).
There was a problem hiding this comment.
Maybe we should make it consistent with the contributing guide:
https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md#recommendations
Types from the documented module should be un-qualified
There was a problem hiding this comment.
Yes, we should fix that - that's not the convention we use today (the examples should show what the customer of the library will write, so it should be qualified). Thanks for pointing that out!
And let's change it for these new examples 🙂.
Pull request has been modified.
skinny85
left a comment
There was a problem hiding this comment.
Thanks for the contribution @LukvonStrom! A few comments before we merge this one in 🙂.
| path: path.join(__dirname, 'directory/'), | ||
| }); | ||
|
|
||
| const repo = new Repository(this, 'Repository', { |
There was a problem hiding this comment.
Yes, we should fix that - that's not the convention we use today (the examples should show what the customer of the library will write, so it should be qualified). Thanks for pointing that out!
And let's change it for these new examples 🙂.
| ```ts | ||
| const repo = new Repository(this, 'Repository', { | ||
| repositoryName: 'MyRepositoryName', | ||
| code: Code.fromDirectory(path.join(__dirname, 'directory/'), 'develop'), // optional property, branch parameter can be omitted |
There was a problem hiding this comment.
I wonder if code / Code is too specific a word here. What do you think about renaming the property and the class to contents / Contents? Or maybe even contents for the property, and RepositoryContents for the class?
There was a problem hiding this comment.
As Git is a version control system for primarily code, I would leave it on code for now, if that's ok with you?
skinny85
left a comment
There was a problem hiding this comment.
Looks great @LukvonStrom! Just a few tiny last comments, mainly around docs, before we merge this in!
Co-authored-by: Adam Ruka <[email protected]>
Pull request has been modified.
skinny85
left a comment
There was a problem hiding this comment.
Looks great, thanks for the all work on this @LukvonStrom!
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
…17968) This repo introduces new properties to the constructor signature of the codecommit L2 Repository. It allows users to upload code when creating a codecommit repository by leveraging the aws-s3-assets lib. The user is able to upload whole directories at the moment. The behaviour has a unit tests, and an integration test, which is passing (verified manually as well). Closes aws#17967, provides a possible fix to aws#16958 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…17968) This repo introduces new properties to the constructor signature of the codecommit L2 Repository. It allows users to upload code when creating a codecommit repository by leveraging the aws-s3-assets lib. The user is able to upload whole directories at the moment. The behaviour has a unit tests, and an integration test, which is passing (verified manually as well). Closes aws#17967, provides a possible fix to aws#16958 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This repo introduces new properties to the constructor signature of the codecommit L2 Repository.
It allows users to upload code when creating a codecommit repository by leveraging the aws-s3-assets lib.
The user is able to upload whole directories at the moment.
The behaviour has a unit tests, and an integration test, which is passing (verified manually as well).
Closes #17967, provides a possible fix to #16958
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license