moved and update github handling code