-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Current project does not behave as expected:
-
Create a file
test.txt, commit it (commit shaaaa111), push it -
File exists on S3, logs show "creating test.txt"
-
Now delete the file, commit again (sha
bbb222), don't push yet -
Now make another commit (
git add other-test-file.txt), commit has shaccc333, push both commitsbbb222andccc333 -
Lambda function fires once, "new head" is seen as
ccc333, buttest.txtstill exists on S3, along withother-test-file.txt... logs show that commitccc333was processed, butbbb222was not
I tested this multiple times and was quite confused by the behavior. In reality, I first noticed it when I made a new commit bbb222 and then merged in a branch to get to sha ccc333 - I realized that the head_commit object in the github eventObj notification was only including the merged file changes, and did not include my changes from bbb222.
Expected behavior: Handler should be smart enough to iterate all commits in eventObj.commits array (which will include up to 20 commits at once... supporting a huge push with more than 20 commits will be much more involved, but just supporting 20 commits should be a good bandaid)
I have a full working fix for this, I am ready to submit a PR except I don't want to make it public until issue #5 is resolved