From 0c394a0e697c0dd0d48deeafdf455289f622f987 Mon Sep 17 00:00:00 2001 From: Patrick Stevens <3138005+Smaug123@users.noreply.github.com> Date: Sun, 22 Sep 2024 13:56:10 +0100 Subject: [PATCH] Add ToString method to MergeStyle (#96) --- Gitea.Declarative.Lib/ConfigSchema.fs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Gitea.Declarative.Lib/ConfigSchema.fs b/Gitea.Declarative.Lib/ConfigSchema.fs index 17ed3d8..db5da87 100644 --- a/Gitea.Declarative.Lib/ConfigSchema.fs +++ b/Gitea.Declarative.Lib/ConfigSchema.fs @@ -18,13 +18,15 @@ type MergeStyle = elif s = "rebase-merge" then MergeStyle.RebaseMerge else failwithf "Unrecognised merge style '%s'" s - static member toString (s : MergeStyle) : string = - match s with + override this.ToString () : string = + match this with | Merge -> "merge" | RebaseMerge -> "rebase-merge" | Rebase -> "rebase" | Squash -> "squash" + static member toString (m : MergeStyle) = m.ToString () + type PushMirror = { GitHubAddress : Uri