mirror of
https://github.com/desktop/desktop
synced 2024-08-25 03:07:41 +00:00
parent
e9b6653a3a
commit
730ef46bbb
|
@ -31,9 +31,19 @@ export function isWebFlowCommitter(
|
|||
return true
|
||||
}
|
||||
|
||||
if (name === 'GitHub Enterprise') {
|
||||
const host = new URL(endpoint).host.toLowerCase()
|
||||
return email.endsWith(`@${host}`)
|
||||
if (endpoint !== getDotComAPIEndpoint() && name === 'GitHub Enterprise') {
|
||||
// We can't assume that the email address will match any specific format
|
||||
// here since the web flow committer email address on GHES is the same as
|
||||
// the noreply email which can be configured by domain administrators so
|
||||
// we'll just have to assume that for a GitHub hosted repository (but not
|
||||
// GitHub.com) a commit author of the name 'GitHub Enterprise' is the web
|
||||
// flow author.
|
||||
//
|
||||
// Hello future contributor: Turns out the web flow committer name is based
|
||||
// on the "flavor" of GitHub so it's possible that you're here wondering why
|
||||
// this isn't working and chances are it's because we've updated the
|
||||
// GHES branding or introduced some new flavor.
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
|
|
Loading…
Reference in a new issue