-
Notifications
You must be signed in to change notification settings - Fork 704
Allow verified GitHub emails when none are private #6921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
See microsoft#6916. If users haven't opted-in to use private email, still allow all secondary email addresses to be used. The REST response shows these email records with `"visibility": null`.
kabel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The noreply address suffix may not work as expected on GitHub Enterprise Server. I no longer have access to a enterprise server to verify what the noreply address is there (if it's customized for the on-premise instance).
alexr00
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // sort the primary email to the first index | ||
| return data.filter(email => email.visibility === 'public' || email.email.toLowerCase().endsWith('@users.noreply.github.com')).sort((a, b) => +b.primary - +a.primary).map(email => email.email); | ||
| const hasPrivate = data.some(email => email.visibility === 'private'); | ||
| return data.filter(email => hasPrivate ? email.email.endsWith('@users.noreply.github.com') : email.verified) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GitHub API is unclear, but I think this fix makes sense.
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
See #6916.
If users haven't opted-in to use private email, still allow all secondary email addresses to be used. The REST response shows these email records with
"visibility": null.