I need to add this functionality into my GO program, with goal to poll the repo and perform a git pull on changes. I have been using https://github.com/src-d/go-git but am unable to find a way to poll.
I don't want to use a webhook to avoid creating a server for incoming payloads.
go-git does not provide this functionality out of the box, so you would need to write a small funciton.
time.Ticker
, as described in Periodically polling a REST endpoint in Gohttp.Get
for the REST API endpoint, one could use this _examples/pull/main.go from official go-git documentationLet me know if that helps!