aboutsummaryrefslogtreecommitdiff
path: root/git_hooks_handle_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'git_hooks_handle_linux.go')
-rw-r--r--git_hooks_handle_linux.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/git_hooks_handle_linux.go b/git_hooks_handle_linux.go
index 37afba1..ca262e3 100644
--- a/git_hooks_handle_linux.go
+++ b/git_hooks_handle_linux.go
@@ -233,12 +233,12 @@ func (s *server) hooksHandler(conn net.Conn) {
var newMRLocalID int
if packPass.userID != 0 {
- err = database.QueryRow(ctx,
+ err = s.database.QueryRow(ctx,
"INSERT INTO merge_requests (repo_id, creator, source_ref, status) VALUES ($1, $2, $3, 'open') RETURNING repo_local_id",
packPass.repoID, packPass.userID, strings.TrimPrefix(refName, "refs/heads/"),
).Scan(&newMRLocalID)
} else {
- err = database.QueryRow(ctx,
+ err = s.database.QueryRow(ctx,
"INSERT INTO merge_requests (repo_id, source_ref, status) VALUES ($1, $2, 'open') RETURNING repo_local_id",
packPass.repoID, strings.TrimPrefix(refName, "refs/heads/"),
).Scan(&newMRLocalID)
@@ -259,7 +259,7 @@ func (s *server) hooksHandler(conn net.Conn) {
var existingMRUser int
var isAncestor bool
- err = database.QueryRow(ctx,
+ err = s.database.QueryRow(ctx,
"SELECT COALESCE(creator, 0) FROM merge_requests WHERE source_ref = $1 AND repo_id = $2",
strings.TrimPrefix(refName, "refs/heads/"), packPass.repoID,
).Scan(&existingMRUser)