diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-13 09:19:54 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-13 09:19:54 +0800 |
commit | cfc8bd2bd3930fc91847a71a8d0092c2c85b0f4a (patch) | |
tree | 3b4bfb39e86fb430f8f652b42ec03270e191b7b5 /http_handle_repo_tree.go | |
parent | _repo_header.html: Purge (diff) | |
download | forge-cfc8bd2bd3930fc91847a71a8d0092c2c85b0f4a.tar.gz forge-cfc8bd2bd3930fc91847a71a8d0092c2c85b0f4a.tar.zst forge-cfc8bd2bd3930fc91847a71a8d0092c2c85b0f4a.zip |
repo_index: Add repo descriptions
Diffstat (limited to 'http_handle_repo_tree.go')
-rw-r--r-- | http_handle_repo_tree.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/http_handle_repo_tree.go b/http_handle_repo_tree.go index acc03e4..b1a2d62 100644 --- a/http_handle_repo_tree.go +++ b/http_handle_repo_tree.go @@ -28,11 +28,13 @@ func handle_repo_tree(w http.ResponseWriter, r *http.Request, params map[string] } } params["ref_type"], params["ref"], params["path_spec"] = ref_type, ref_name, path_spec - repo, err := open_git_repo(r.Context(), group_name, repo_name) + repo, description, err := open_git_repo(r.Context(), group_name, repo_name) if err != nil { fmt.Fprintln(w, "Error opening repo:", err.Error()) return } + params["repo_description"] = description + ref_hash, err := get_ref_hash_from_type_and_name(repo, ref_type, ref_name) if err != nil { fmt.Fprintln(w, "Error getting ref hash:", err.Error()) |