summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-14 04:17:26 -0700
committerUnknwon <u@gogs.io>2016-08-14 04:17:26 -0700
commitdccb0c15b996ac4dc0307cbfed140ce1558d7e3c (patch)
tree97593eae3a1023296c2c03258e6bc4ae4c02b6bf /models/repo.go
parent3f7f4852efaaa56a0dada832dc652a1fc8869ae7 (diff)
downloadgitea-dccb0c15b996ac4dc0307cbfed140ce1558d7e3c.tar.gz
gitea-dccb0c15b996ac4dc0307cbfed140ce1558d7e3c.zip
Replace convert.To with APIFormat calls
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/models/repo.go b/models/repo.go
index ef8cd34375..f3eb439cac 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -482,28 +482,6 @@ func (repo *Repository) SavePatch(index int64, patch []byte) error {
return nil
}
-// ComposePayload composes and returns *api.PayloadRepo corresponding to the repository.
-func (repo *Repository) ComposePayload() *api.PayloadRepo {
- cl := repo.CloneLink()
- return &api.PayloadRepo{
- ID: repo.ID,
- Name: repo.Name,
- URL: repo.FullLink(),
- SSHURL: cl.SSH,
- CloneURL: cl.HTTPS,
- Description: repo.Description,
- Website: repo.Website,
- Watchers: repo.NumWatches,
- Owner: &api.PayloadAuthor{
- Name: repo.MustOwner().DisplayName(),
- Email: repo.MustOwner().Email,
- UserName: repo.MustOwner().Name,
- },
- Private: repo.IsPrivate,
- DefaultBranch: repo.DefaultBranch,
- }
-}
-
func isRepositoryExist(e Engine, u *User, repoName string) (bool, error) {
has, err := e.Get(&Repository{
OwnerID: u.ID,