Some more refactoring of github command to make things DRY and clear.