lumoslabs / txgh

A library for automatically syncing translation resources between Github and Transifex.
1 stars 1 forks source link

Fix issue trying to call .fetch on nil #60

Closed camertron closed 8 years ago

camertron commented 8 years ago

https://rollbar.com/lumoslabs/txgh/items/115/

Github sends two events when a branch is deleted: a push event where the after commit is 40 zeroes, and a delete event. Txgh cleans up old resources when it receives the delete event, and basically ignores the corresponding push event. However, our PushAttributes class expects push payloads to always have a head_commit attribute, which deleted pushes don't have. This PR fixes the issue by falling back to the pusher attribute.

@lumoslabs/platform