Current project does not behave as expected:
-
Create a file test.txt, commit it (commit sha aaa111), 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 sha ccc333, push both commits bbb222 and ccc333
-
Lambda function fires once, "new head" is seen as ccc333, but test.txt still exists on S3, along with other-test-file.txt... logs show that commit ccc333 was processed, but bbb222 was 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
Current project does not behave as expected:
Create a file
test.txt, commit it (commit shaaaa111), push itFile exists on S3, logs show "creating test.txt"
Now delete the file, commit again (sha
bbb222), don't push yetNow make another commit (
git add other-test-file.txt), commit has shaccc333, push both commitsbbb222andccc333Lambda 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 notI tested this multiple times and was quite confused by the behavior. In reality, I first noticed it when I made a new commit
bbb222and then merged in a branch to get to shaccc333- I realized that thehead_commitobject in the githubeventObjnotification was only including the merged file changes, and did not include my changes frombbb222.Expected behavior: Handler should be smart enough to iterate all commits in
eventObj.commitsarray (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