From 0f35ae1fb99bc2f4db741e5f7b16273662459880 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 31 Mar 2025 15:14:11 +0800 Subject: Per-repo merge request sequences --- http_handle_repo_contrib_one.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'http_handle_repo_contrib_one.go') diff --git a/http_handle_repo_contrib_one.go b/http_handle_repo_contrib_one.go index 485362d..0fc56fa 100644 --- a/http_handle_repo_contrib_one.go +++ b/http_handle_repo_contrib_one.go @@ -32,8 +32,8 @@ func httpHandleRepoContribOne(writer http.ResponseWriter, request *http.Request, mrIDInt = int(mrIDInt64) if err = database.QueryRow(request.Context(), - "SELECT COALESCE(title, ''), status, source_ref, COALESCE(destination_branch, '') FROM merge_requests WHERE id = $1", - mrIDInt, + "SELECT COALESCE(title, ''), status, source_ref, COALESCE(destination_branch, '') FROM merge_requests WHERE repo_id = $1 AND repo_local_id = $2", + params["repo_id"], mrIDInt, ).Scan(&title, &status, &srcRefStr, &dstBranchStr); err != nil { errorPage500(writer, params, "Error querying merge request: "+err.Error()) return -- cgit v1.2.3