Sourcegraph: Add option to not resolve committers to their account display name

Created on 16 Mar 2019  路  4Comments  路  Source: sourcegraph/sourcegraph

When viewing a repository on Sourcegraph, the commit history shows a user's display name if they have a user account in Sourcegraph. I'd like the ability to disable the functionality that resolves a committer to their user display name in my Sourcegraph instance and use the author information from git instead.

Display names are mutable, which makes it difficult in an organization to find out who made certain commits if the display name is changed to something arbitrary. I believe that Sourcegraph falls back to git author information when there's no matching user account- it would be great if we could set that as the default for all commit authors.

Requested by https://app.hubspot.com/contacts/2762526/company/693777177

customer feature-request webapp

Most helpful comment

Thanks for posting this.

We can certainly add an option to disable resolution from Git email to Sourcegraph user display name. Before doing that, I want to propose some other solutions and get your feedback, in the hopes of avoiding adding another configuration point.

Right now it looks like this (the "Chris Wendt committed 7 hours ago" part):

image

  • Would the following solve your problem? In both, there would be a tooltip with the Git email address.

    • If a Sourcegraph account exists for the user: chrismwendt (Chris Wendt) committed about 7 hours ago

    • The "Chris Wendt" display name could be arbitrary, but you'd still be able to see the username. (The new auth.disableUsernameChanges config option lets you prevent users from changing usernames.)

    • Otherwise (from Git): Chris Wendt committed about 7 hours ago

  • Would it solve your problem if users could not edit their display name (the value from SSO would always be used)?
  • If none of these alternatives work for you, would you want the disable-Git-email-resolution setting to be global or per-user?

All 4 comments

Thanks for posting this.

We can certainly add an option to disable resolution from Git email to Sourcegraph user display name. Before doing that, I want to propose some other solutions and get your feedback, in the hopes of avoiding adding another configuration point.

Right now it looks like this (the "Chris Wendt committed 7 hours ago" part):

image

  • Would the following solve your problem? In both, there would be a tooltip with the Git email address.

    • If a Sourcegraph account exists for the user: chrismwendt (Chris Wendt) committed about 7 hours ago

    • The "Chris Wendt" display name could be arbitrary, but you'd still be able to see the username. (The new auth.disableUsernameChanges config option lets you prevent users from changing usernames.)

    • Otherwise (from Git): Chris Wendt committed about 7 hours ago

  • Would it solve your problem if users could not edit their display name (the value from SSO would always be used)?
  • If none of these alternatives work for you, would you want the disable-Git-email-resolution setting to be global or per-user?

Thanks for the quick response! Option 1 sounds like a good idea, I'm wondering how would this look for the blame functionality in git-extras? Would it be possible to apply the format of username + display name there as well?

Great, thanks for the input! Yes, we would make the author display consistent everywhere (git-extras, commit list, commit panel, etc.).

Great, sounds good to me. Thank you!

Was this page helpful?
0 / 5 - 0 ratings