atomist-attic / sdm-smoke-test

sdm-smoke-test
Apache License 2.0
0 stars 0 forks source link

For finding changes in the push, use the list of commits and not `before` #2

Closed jessitron closed 6 years ago

jessitron commented 6 years ago

We want to list the files changed in a push, for code reactions.

The before field on a push is "where did this ref last point?" which is different from the contents of the push.

The contents of the push are determined by the list of commits in the push. We need to take the earliest commit in that list (which seems to be, the last one) and then get its parent, and then compare the tip of the push (after or the first commit in the list, same one) to that.

This will make both new branches and force-pushes find the correct list of changed files.

Also, we should probably never use before. It doesn't mean what we think it does, except maybe for pushes to the default branch when force-push is disallowed.

jessitron commented 6 years ago

dang it! wrong repo.

jessitron commented 6 years ago

Issue moved to atomist/github-sdm#293