clarify name/username/owner/pusher for webhook

This commit is contained in:
Christopher Brickley 2014-09-17 09:11:51 -04:00
parent 061a879cea
commit f94d7c3f51
3 changed files with 34 additions and 9 deletions

View file

@ -167,6 +167,14 @@ func (u *User) GetOrganizations() error {
return nil
}
// GetFullNameFallback returns Full Name if set, otherwise username
func (u *User) GetFullNameFallback() string {
if u.FullName == "" {
return u.Name
}
return u.FullName
}
// IsUserExist checks if given user name exist,
// the user name should be noncased unique.
func IsUserExist(name string) (bool, error) {