diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-09-03 01:20:24 -0700 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-09-03 11:20:24 +0300 |
commit | b689bb61804fddfd2df8df7250522b0fc227484e (patch) | |
tree | 6cd96dfc3c0c7b2a0b265217f2893aa606307b0a /routers/repo/repo.go | |
parent | 79f7839633167bbb146a7b0d17ce0ec1c990d085 (diff) | |
download | gitea-b689bb61804fddfd2df8df7250522b0fc227484e.tar.gz gitea-b689bb61804fddfd2df8df7250522b0fc227484e.zip |
Webhooks for repo creation/deletion (#1663)
* Webhooks for repo creation/deletion
* add createHookTask
* Add handles for GetSlackPayload and GetDiscordPayload
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r-- | routers/repo/repo.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 5fcbb84b9a..ebbce1e19c 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -127,7 +127,7 @@ func CreatePost(ctx *context.Context, form auth.CreateRepoForm) { return } - repo, err := models.CreateRepository(ctxUser, models.CreateRepoOptions{ + repo, err := models.CreateRepository(ctx.User, ctxUser, models.CreateRepoOptions{ Name: form.RepoName, Description: form.Description, Gitignores: form.Gitignores, @@ -143,7 +143,7 @@ func CreatePost(ctx *context.Context, form auth.CreateRepoForm) { } if repo != nil { - if errDelete := models.DeleteRepository(ctxUser.ID, repo.ID); errDelete != nil { + if errDelete := models.DeleteRepository(ctx.User, ctxUser.ID, repo.ID); errDelete != nil { log.Error(4, "DeleteRepository: %v", errDelete) } } @@ -204,7 +204,7 @@ func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) { return } - repo, err := models.MigrateRepository(ctxUser, models.MigrateRepoOptions{ + repo, err := models.MigrateRepository(ctx.User, ctxUser, models.MigrateRepoOptions{ Name: form.RepoName, Description: form.Description, IsPrivate: form.Private || setting.Repository.ForcePrivate, @@ -218,7 +218,7 @@ func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) { } if repo != nil { - if errDelete := models.DeleteRepository(ctxUser.ID, repo.ID); errDelete != nil { + if errDelete := models.DeleteRepository(ctx.User, ctxUser.ID, repo.ID); errDelete != nil { log.Error(4, "DeleteRepository: %v", errDelete) } } |