Refactor ugly email method in GitHub provider