refact git hub module, fix the refresh logic