From 1235c6c55ff579c68eaef5f7573337febebde3a8 Mon Sep 17 00:00:00 2001 From: BrookJeynes Date: Tue, 13 May 2025 17:25:27 +1000 Subject: [PATCH] appview: pages: introduce `ForkStatus` construct --- appview/pages/pages.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/appview/pages/pages.go b/appview/pages/pages.go index eb3c079..027af18 100644 --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -402,6 +402,20 @@ func (p *Pages) RepoDescriptionFragment(w io.Writer, params RepoDescriptionParam return p.executePlain("repo/fragments/repoDescription", w, params) } +type ForkStatus int + +const ( + UpToDate ForkStatus = 0 + FastForwardable = 1 + Conflict = 2 + MissingBranch = 3 +) + +type ForkInfo struct { + IsFork bool + Status ForkStatus +} + type RepoIndexParams struct { LoggedInUser *oauth.User RepoInfo repoinfo.RepoInfo -- 2.51.2