Skip to content

Conversation

@kabel
Copy link
Contributor

@kabel kabel commented May 7, 2025

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.

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`.
Copy link
Contributor Author

@kabel kabel left a 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).

Copy link
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kabel, thanks for this PR. I'm likely going to have to release with bug #6916, today, but I'll make a recovery release with this fix tomorrow.

// 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)
Copy link
Member

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.

@vs-code-engineering vs-code-engineering bot added this to the May 2025 milestone May 8, 2025
@alexr00 alexr00 enabled auto-merge (squash) May 8, 2025 09:09
@alexr00 alexr00 closed this May 8, 2025
auto-merge was automatically disabled May 8, 2025 10:19

Pull request was closed

@alexr00 alexr00 reopened this May 8, 2025
@alexr00
Copy link
Member

alexr00 commented May 8, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@alexr00 alexr00 enabled auto-merge (squash) May 8, 2025 10:21
@alexr00 alexr00 disabled auto-merge May 8, 2025 10:21
@alexr00 alexr00 enabled auto-merge (squash) May 8, 2025 10:23
@alexr00 alexr00 merged commit a7ad1a2 into microsoft:main May 8, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants