aboutsummaryrefslogtreecommitdiff
path: root/internal/cmd/hook.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cmd/hook.go')
-rw-r--r--internal/cmd/hook.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/cmd/hook.go b/internal/cmd/hook.go
index de95a57d..0e9136b0 100644
--- a/internal/cmd/hook.go
+++ b/internal/cmd/hook.go
@@ -23,7 +23,6 @@ import (
"gogs.io/gogs/internal/conf"
"gogs.io/gogs/internal/db"
- "gogs.io/gogs/internal/db/errors"
"gogs.io/gogs/internal/email"
"gogs.io/gogs/internal/httplib"
)
@@ -93,7 +92,7 @@ func runHookPreReceive(c *cli.Context) error {
repoID := com.StrTo(os.Getenv(db.ENV_REPO_ID)).MustInt64()
protectBranch, err := db.GetProtectBranchOfRepoByName(repoID, branchName)
if err != nil {
- if errors.IsErrBranchNotExist(err) {
+ if db.IsErrBranchNotExist(err) {
continue
}
fail("Internal error", "GetProtectBranchOfRepoByName [repo_id: %d, branch: %s]: %v", repoID, branchName, err)