function getEntityPresentation()

in src/components/issue-formatter/issue-formatter.ts [44:59]


function getEntityPresentation<T extends {[key: string]: any}>(entity?: T) {
  let userName: string = '';

  if (entity) {
    if (!entity.ringId) {
      userName = entity.localizedName || entity.name || entity.userName || entity.login;
    }

    if (!userName) {
      userName =
        entity.fullName || entity.localizedName || entity.name || entity.login || entity.presentation || entity.text;
    }
  }

  return userName || '';
}