1
0
Fork 0
forked from forgejo/forgejo

WIP: create PR - choose branch

This commit is contained in:
Unknwon 2015-08-08 22:43:14 +08:00
parent d015d951bd
commit dea3a8c6a4
34 changed files with 396 additions and 212 deletions

View file

@ -17,7 +17,7 @@ import (
// GET /repos/:username/:reponame/hooks
// https://developer.github.com/v3/repos/hooks/#list-hooks
func ListRepoHooks(ctx *middleware.Context) {
hooks, err := models.GetWebhooksByRepoId(ctx.Repo.Repository.Id)
hooks, err := models.GetWebhooksByRepoId(ctx.Repo.Repository.ID)
if err != nil {
ctx.JSON(500, &base.ApiJsonErr{"GetWebhooksByRepoId: " + err.Error(), base.DOC_URL})
return
@ -67,7 +67,7 @@ func CreateRepoHook(ctx *middleware.Context, form api.CreateHookOption) {
}
w := &models.Webhook{
RepoId: ctx.Repo.Repository.Id,
RepoId: ctx.Repo.Repository.ID,
Url: form.Config["url"],
ContentType: models.ToHookContentType(form.Config["content_type"]),
Secret: form.Config["secret"],