From f8977f4847b8df9feec1bb5913f75401d79db876 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 7 Sep 2014 19:39:26 -0400 Subject: [PATCH] Organization level webhooks --- README.md | 5 +++-- README_ZH.md | 5 +++-- cmd/dump.go | 8 +++++--- cmd/web.go | 6 +++--- conf/app.ini | 2 +- templates/org/settings/hooks.tmpl | 20 ++++++++++---------- 6 files changed, 25 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 689b0df4f..3115d3fc6 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Gogs(Go Git Service) is a painless self-hosted Git Service written in Go. ![Demo](http://gowalker.org/public/gogs_demo.gif) -##### Current version: 0.4.9 Beta +##### Current version: 0.5.0 Beta ### NOTICES @@ -35,7 +35,8 @@ The goal of this project is to make the easiest, fastest and most painless way t - Register/delete/rename account - Create/manage/delete organization with team management - Create/migrate/mirror/delete/watch/rename/transfer public/private repository -- Repository viewer/release/issue tracker/webhooks +- Repository viewer/release/issue tracker +- Repository and Organization level webhooks - Add/remove repository collaborators - Gravatar and cache support - Mail service(register, issue) diff --git a/README_ZH.md b/README_ZH.md index 401c8186c..ef154d0e6 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -5,7 +5,7 @@ Gogs(Go Git Service) 是一个基于 Go 语言的自助 Git 服务。 ![Demo](http://gowalker.org/public/gogs_demo.gif) -##### 当前版本:0.4.9 Beta +##### 当前版本:0.5.0 Beta ## 开发目的 @@ -26,7 +26,8 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自 - 注册/删除/重命名 用户 - 创建/管理/删除 组织以及团队管理功能 - 创建/迁移/镜像/删除/关注/重命名/转移 公开/私有 仓库 -- 仓库 浏览/发布/工单管理/Web 钩子 +- 仓库 浏览/发布/工单管理 +- 仓库和组织级别 Web 钩子 - 添加/删除 仓库协作者 - Gravatar 以及缓存支持 - 邮件服务(注册、Issue) diff --git a/cmd/dump.go b/cmd/dump.go index 2a54db1a8..414912243 100644 --- a/cmd/dump.go +++ b/cmd/dump.go @@ -24,16 +24,18 @@ var CmdDump = cli.Command{ Description: `Dump compresses all related files and database into zip file. It can be used for backup and capture Gogs server image to send to maintainer`, Action: runDump, - Flags: []cli.Flag{}, + Flags: []cli.Flag{ + cli.BoolFlag{"verbose, v", "show process details", ""}, + }, } -func runDump(*cli.Context) { +func runDump(ctx *cli.Context) { setting.NewConfigContext() models.LoadModelsConfig() models.SetEngine() log.Printf("Dumping local repositories...%s", setting.RepoRootPath) - zip.Verbose = false + zip.Verbose = ctx.Bool("verbose") defer os.Remove("gogs-repo.zip") if err := zip.PackTo(setting.RepoRootPath, "gogs-repo.zip", true); err != nil { log.Fatalf("Fail to dump local repositories: %v", err) diff --git a/cmd/web.go b/cmd/web.go index 8182d7b56..e70380764 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -69,9 +69,9 @@ func newMacaron() *macaron.Macaron { SkipLogging: !setting.DisableRouterLog, }, )) - if setting.EnableGzip { - m.Use(macaron.Gzip()) - } + // if setting.EnableGzip { + // m.Use(macaron.Gzip()) + // } m.Use(macaron.Renderer(macaron.RenderOptions{ Directory: path.Join(setting.StaticRootPath, "templates"), Funcs: []template.FuncMap{base.TemplateFuncs}, diff --git a/conf/app.ini b/conf/app.ini index c646160e5..3e7e191c3 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -29,7 +29,7 @@ KEY_FILE = custom/https/key.pem ; default is the path where Gogs is executed STATIC_ROOT_PATH = ; Application level GZIP support -ENABLE_GZIP = false +#ENABLE_GZIP = false [database] ; Either "mysql", "postgres" or "sqlite3", it's your choice diff --git a/templates/org/settings/hooks.tmpl b/templates/org/settings/hooks.tmpl index 713cfeb45..2f6ba630e 100644 --- a/templates/org/settings/hooks.tmpl +++ b/templates/org/settings/hooks.tmpl @@ -16,16 +16,16 @@