diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-19 12:47:23 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-19 12:47:23 +0800 |
commit | 5cc0b5baf978ce87a95548cedc30d658e0937b8d (patch) | |
tree | 8a0f41f7d35f1481e82df7321331f97eb427d7c6 | |
parent | repo/index: Don't show HTTP clone URL as it's the same as the Web URL (diff) | |
download | forge-5cc0b5baf978ce87a95548cedc30d658e0937b8d.tar.gz forge-5cc0b5baf978ce87a95548cedc30d658e0937b8d.tar.zst forge-5cc0b5baf978ce87a95548cedc30d658e0937b8d.zip |
hooks: Add TODOs on where to create MRs and MR history points
-rw-r--r-- | git_hooks_handle.go | 8 |
1 files changed, 8 insertions, 0 deletions
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 |