From 5cc0b5baf978ce87a95548cedc30d658e0937b8d Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 19 Feb 2025 12:47:23 +0800 Subject: hooks: Add TODOs on where to create MRs and MR history points --- git_hooks_handle.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/git_hooks_handle.go b/git_hooks_handle.go index 64d327e..759e426 100644 --- a/git_hooks_handle.go +++ b/git_hooks_handle.go @@ -138,8 +138,16 @@ func hooks_handle_connection(conn net.Conn) { if strings.HasPrefix(ref_name, "refs/heads/contrib/") { if all_zero_num_string(old_oid) { ref_ok[ref_name] = 0 + // TODO: Create a merge request. If that fails, + // we should just reject this entire push + // immediately. } else { ref_ok[ref_name] = 2 + // TODO: Check if the current user is authorized + // to push to this contrib branch. + // Then, check if this push is a fast-forward. + // If not, we create a MR history archive ref + // that points to the old object name. } } else { ref_ok[ref_name] = 1 -- cgit v1.2.3