Add repo hist function