import { plainToClass } from '@marcj/marshal' ; import { User } from '@pimp-my-pr/server/user/core/domain' ; import { GithubUser } from './github-user.entity' ; export function mapGithubUser ( githubUser ) { return plainToClass ( User , { avatarUrl : githubUser . avatar_url , id : githubUser . id , name : githubUser . login } ) ; }