Skip to content

Support a push with multiple commits #8

@leewardbound

Description

@leewardbound

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions