mirror of https://github.com/gogs/gogs.git
models/webhook: fix bad query
parent
95b94b2166
commit
2322de653c
|
@ -938,7 +938,7 @@ dashboard.git_gc_repos = Do garbage collection on repositories
|
|||
dashboard.git_gc_repos_success = All repositories have done garbage collection successfully.
|
||||
dashboard.resync_all_sshkeys = Rewrite '.ssh/authorized_keys' file (caution: non-Gogs keys will be lost)
|
||||
dashboard.resync_all_sshkeys_success = All public keys have been rewritten successfully.
|
||||
dashboard.resync_all_hooks = Resync pre-receive, update and post-receive hooks of all repositories.
|
||||
dashboard.resync_all_hooks = Resync pre-receive, update and post-receive hooks of all repositories
|
||||
dashboard.resync_all_hooks_success = All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
|
||||
dashboard.reinit_missing_repos = Reinitialize all repository records that lost Git files
|
||||
dashboard.reinit_missing_repos_success = All repository records that lost Git files have been reinitialized successfully.
|
||||
|
|
2
gogs.go
2
gogs.go
|
@ -16,7 +16,7 @@ import (
|
|||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.9.160.0219"
|
||||
const APP_VER = "0.9.160.0220"
|
||||
|
||||
func init() {
|
||||
setting.AppVer = APP_VER
|
||||
|
|
|
@ -216,10 +216,7 @@ func GetWebhookByOrgID(orgID, id int64) (*Webhook, error) {
|
|||
// GetActiveWebhooksByRepoID returns all active webhooks of repository.
|
||||
func GetActiveWebhooksByRepoID(repoID int64) ([]*Webhook, error) {
|
||||
webhooks := make([]*Webhook, 0, 5)
|
||||
return webhooks, x.Find(&webhooks, &Webhook{
|
||||
RepoID: repoID,
|
||||
IsActive: true,
|
||||
})
|
||||
return webhooks, x.Where("repo_id = ?", repoID).And("is_active = ?", true).Find(&webhooks)
|
||||
}
|
||||
|
||||
// GetWebhooksByRepoID returns all webhooks of a repository.
|
||||
|
@ -459,10 +456,6 @@ func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) err
|
|||
|
||||
var payloader api.Payloader
|
||||
for _, w := range ws {
|
||||
if !w.IsActive {
|
||||
continue
|
||||
}
|
||||
|
||||
switch event {
|
||||
case HOOK_EVENT_CREATE:
|
||||
if !w.HasCreateEvent() {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
0.9.160.0219
|
||||
0.9.160.0220
|
Loading…
Reference in New Issue