diff --git a/docs/mdsource/repom.generated.source.md b/docs/mdsource/repom.generated.source.md index c0d5b223..f29d5e69 100644 --- a/docs/mdsource/repom.generated.source.md +++ b/docs/mdsource/repom.generated.source.md @@ -193,7 +193,7 @@ snippet: just-text@1-scenario01 ## pin-repository@1 -Action to pin (or unpin) the current repository. Pinning is not persistant and all pinned repositories will be cleared when RepoM exits. +Action to pin (or unpin) the current repository. Pinning is not persistent and all pinned repositories will be cleared when RepoM exits. Pinning a repository allowed custom filtering, ordering and searching. Properties: @@ -201,7 +201,7 @@ Properties: - `name`: Name of the menu item. ([Text](repository_action_types.md#text)) - `active`: Whether the menu item is enabled. ([Predicate](repository_action_types.md#predicate)) - `context`: The context in which the action is available. ([Context](repository_action_types.md#context)) -- `mode`: The pin mode `[Toggle, Pin, UnPin]`. (Nullable, optional) +- `mode`: The pin mode. Should be `toggle`, `pin`, or `un-pin`. Default value is `toggle`. ### Example diff --git a/src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs b/src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs index 1eed1e1c..c8bd8a38 100644 --- a/src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs +++ b/src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs @@ -33,6 +33,11 @@ public TypeInfoDescriptor(ITypeSymbol typeSymbol) { SkipForDocumentGeneration = true; } + + if (Name.Contains("PinMode")) + { + SkipForDocumentGeneration = true; + } } public TypeInfoDescriptor(string name, string csharpTypeName) diff --git a/src/RepoM.ActionMenu.Core/ActionMenu/Model/ActionMenus/Pin/RepositoryActionPinV1.cs b/src/RepoM.ActionMenu.Core/ActionMenu/Model/ActionMenus/Pin/RepositoryActionPinV1.cs index d824cafc..e2363db0 100644 --- a/src/RepoM.ActionMenu.Core/ActionMenu/Model/ActionMenus/Pin/RepositoryActionPinV1.cs +++ b/src/RepoM.ActionMenu.Core/ActionMenu/Model/ActionMenus/Pin/RepositoryActionPinV1.cs @@ -4,9 +4,10 @@ namespace RepoM.ActionMenu.Core.ActionMenu.Model.ActionMenus.Pin; using RepoM.ActionMenu.Interface.YamlModel; using RepoM.ActionMenu.Interface.YamlModel.ActionMenus; using RepoM.ActionMenu.Interface.YamlModel.Templating; +using RepoM.Api.IO.ModuleBasedRepositoryActionProvider.Data; /// -/// Action to pin (or unpin) the current repository. Pinning is not persistant and all pinned repositories will be cleared when RepoM exits. +/// Action to pin (or unpin) the current repository. Pinning is not persistent and all pinned repositories will be cleared when RepoM exits. /// Pinning a repository allowed custom filtering, ordering and searching. /// /// @@ -36,9 +37,10 @@ public string Type public Context? Context { get; set; } /// - /// The pin mode `[Toggle, Pin, UnPin]`. + /// The pin mode. Should be `toggle`, `pin`, or `un-pin`. Default value is `toggle`. /// - public PinMode? Mode { get; set; } // GitHub issue: https://github.com/coenm/RepoM/issues/87 + [PropertyDefaultTypedValue(PinMode.Toggle)] + public PinMode Mode { get; set; } = PinMode.Toggle; // GitHub issue: https://github.com/coenm/RepoM/issues/87 public override string ToString() {