This ensures we do not miss events. E.g.
before:
t0: hash changes to X
t1: send webhook(X), waiting for response
t2: hash changes to Y
t3: queue next webhook(Y) but can't send because previous is not done
t4: crash
t5: restart
t6: find repo at hash Y
no webhook(Y) was sent.
after:
t0: hash changes to X
t1: send webhook(X), waiting for response
t2: hash changes to Y
t3: queue next webhook(Y) but can't send because previous is not done
t4: crash
t5: restart
t6: find repo at hash Y
t7: send webhook(Y), waiting for response
Faster builds and versions from tags. Also use alpine as a base image. We
need alpine for other architectures...
Also change the --wait flag to take a float for sub-second waits.
This plus the test should ensure no regressions. Git makes it tricky to do
some things on a remote that you would think to do on a local repo.
`ls-remote` gives me the info I need with only one test for "HEAD" vs anything
else.
I know this used to work. I must have broken it at some point. Manually
verified for HEAD and a real tag.
Also fix some logging so it is less chatty by default.
v2.0.2
I wanted to understand it all so I ran a bunch of tests and found that it was
resyncing when not required any time the rev was not == HEAD. Some
stackoverflow and git manpage spelunking produced this. Nice side-effect is
tha the workdir is named after the githash instead of random.