From d43f5f17fd1e07230ade010116acabdc2dde27b6 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 28 Feb 2017 10:28:48 -0500 Subject: [PATCH] webhook: fix push panic to organizational repository (#4206) --- gogs.go | 2 +- models/webhook.go | 2 +- templates/.VERSION | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gogs.go b/gogs.go index 82edbdc73..1882895f0 100644 --- a/gogs.go +++ b/gogs.go @@ -16,7 +16,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.10.1.0228" +const APP_VER = "0.10.2.0228" func init() { setting.AppVer = APP_VER diff --git a/models/webhook.go b/models/webhook.go index 0f475df5e..54179ef3b 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -305,7 +305,7 @@ func GetWebhooksByOrgID(orgID int64) (ws []*Webhook, err error) { // getActiveWebhooksByOrgID returns all active webhooks for an organization. func getActiveWebhooksByOrgID(e Engine, orgID int64) ([]*Webhook, error) { - ws := make([]*Webhook, 3) + ws := make([]*Webhook, 0, 3) return ws, e.Where("org_id=?", orgID).And("is_active=?", true).Find(&ws) } diff --git a/templates/.VERSION b/templates/.VERSION index e1c130c69..3762da787 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.10.1.0228 \ No newline at end of file +0.10.2.0228 \ No newline at end of file