summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-08 08:18:03 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-08 08:18:03 -0400
commit23a857d107b06b5639b337aba2e335d3d66ef9db (patch)
tree483f46f826bef1c16b3ee0394e54b56c4f6cdba6 /models/repo.go
parent495d939ca580825c4a91612e38107ecc4339598a (diff)
downloadgitea-23a857d107b06b5639b337aba2e335d3d66ef9db.tar.gz
gitea-23a857d107b06b5639b337aba2e335d3d66ef9db.zip
Add repo info to web hook post
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index 0ca32bc28b..595d79b5c3 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -88,6 +88,11 @@ type Repository struct {
Updated time.Time `xorm:"updated"`
}
+func (repo *Repository) GetOwner() (err error) {
+ repo.Owner, err = GetUserById(repo.OwnerId)
+ return err
+}
+
// IsRepositoryExist returns true if the repository with given name under user has already existed.
func IsRepositoryExist(user *User, repoName string) (bool, error) {
repo := Repository{OwnerId: user.Id}