Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
coenm committed Oct 16, 2024
1 parent 6985cbf commit 8aad90a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/mdsource/repom.generated.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,15 @@ 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:

- `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

Expand Down
5 changes: 5 additions & 0 deletions src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public TypeInfoDescriptor(ITypeSymbol typeSymbol)
{
SkipForDocumentGeneration = true;
}

if (Name.Contains("PinMode"))
{
SkipForDocumentGeneration = true;
}
}

public TypeInfoDescriptor(string name, string csharpTypeName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/// <summary>
/// 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.
/// </summary>
/// <example>
Expand Down Expand Up @@ -36,9 +37,10 @@ public string Type
public Context? Context { get; set; }

/// <summary>
/// The pin mode `[Toggle, Pin, UnPin]`.
/// The pin mode. Should be `toggle`, `pin`, or `un-pin`. Default value is `toggle`.
/// </summary>
public PinMode? Mode { get; set; } // GitHub issue: https://github.com/coenm/RepoM/issues/87
[PropertyDefaultTypedValue<PinMode>(PinMode.Toggle)]
public PinMode Mode { get; set; } = PinMode.Toggle; // GitHub issue: https://github.com/coenm/RepoM/issues/87

public override string ToString()
{
Expand Down

0 comments on commit 8aad90a

Please sign in to comment.