From 568e8f85d2a8ed3a431f17a0b98c8bfa601a1602 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 1 May 2017 22:43:23 +0800 Subject: [PATCH] fix: update --- remote/gitea/fixtures/handler.go | 2 +- remote/gitea/gitea.go | 2 +- remote/gitea/helper.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/remote/gitea/fixtures/handler.go b/remote/gitea/fixtures/handler.go index 33407aa32..94e0d3dc3 100644 --- a/remote/gitea/fixtures/handler.go +++ b/remote/gitea/fixtures/handler.go @@ -56,7 +56,7 @@ func createRepoHook(c *gin.Context) { } `json:"config"` }{} c.BindJSON(&in) - if in.Type != "gogs" || + if in.Type != "gitea" || in.Conf.Type != "json" || in.Conf.URL != "http://localhost" { c.String(500, "") diff --git a/remote/gitea/gitea.go b/remote/gitea/gitea.go index a05ab1e54..5d4f334d7 100644 --- a/remote/gitea/gitea.go +++ b/remote/gitea/gitea.go @@ -303,7 +303,7 @@ func (c *client) Activate(u *model.User, r *model.Repo, link string) error { "content_type": "json", } hook := gitea.CreateHookOption{ - Type: "gogs", + Type: "gitea", Config: config, Events: []string{"push", "create", "pull_request"}, Active: true, diff --git a/remote/gitea/helper.go b/remote/gitea/helper.go index e1d133707..180f6911a 100644 --- a/remote/gitea/helper.go +++ b/remote/gitea/helper.go @@ -186,7 +186,7 @@ func parsePullRequest(r io.Reader) (*pullRequestHook, error) { } // fixMalformedAvatar is a helper function that fixes an avatar url if malformed -// (currently a known bug with gogs) +// (currently a known bug with gitea) func fixMalformedAvatar(url string) string { index := strings.Index(url, "///") if index != -1 {