Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There were two issues with the previous implementation:
Fix detecting changes upon update properly
Why?
CodeCommit has a limit of 100 files per commit.
To workaround this limit, the implementation walked across all the files
and split it into chunks of 99 files. However, when one of those chunks would
not have any changes, it would raise an exception that was handled at the
incorrect level. Causing it to abort the creation of the PR all together.
Even when there were changes in another chunk.
What?
Fixed handling the "no changes in this chunk" error at the chunk level.
So it will only skip that chunk and continue with the next.
Maintaining a list of commits that were created, and if any were, it will open
the pull request.
Additionally, the initial commit code had a lot of repetitive code.
This got refactored as well.
Since there are two initial_commit.py functions, the changes had to be applied
twice.
Add support for paginating differences in initial commit
Why?
Before, we were only matching against the first page of differences.
This could result in files being deleted erroneously if the repository went
through a large change such as an update that touches almost all files.
What?
Added support for paginating the differences and updated the tests to cover
these.
By submitting this pull request, I confirm that you can use, modify, copy, and
redistribute this contribution, under the terms of your choice.