From 5cc0b5baf978ce87a95548cedc30d658e0937b8d Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 19 Feb 2025 12:47:23 +0800 Subject: [PATCH] hooks: Add TODOs on where to create MRs and MR history points --- git_hooks_handle.go | 8 ++++++++ diff --git a/git_hooks_handle.go b/git_hooks_handle.go index 64d327e92aaf9a43c0dcf40575024e1d1d39f9fe..759e426d1714e5b2bd82467bf090d17bd57eb3e3 100644 --- a/git_hooks_handle.go +++ b/git_hooks_handle.go @@ -138,8 +138,16 @@ 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 -- 2.48.1