function to hit github api