fix: update

This commit is contained in:
Bo-Yi Wu 2017-05-01 22:43:23 +08:00
parent 0f95c504a2
commit 568e8f85d2
No known key found for this signature in database
GPG key ID: 0F84B2110C500B1F
3 changed files with 3 additions and 3 deletions

View file

@ -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, "")

View file

@ -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,

View file

@ -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 {