diff --git a/docs/mdsource/plugin_repom.plugin.azuredevops.generated.source.md b/docs/mdsource/plugin_repom.plugin.azuredevops.generated.source.md index c59831f3..0d39786b 100644 --- a/docs/mdsource/plugin_repom.plugin.azuredevops.generated.source.md +++ b/docs/mdsource/plugin_repom.plugin.azuredevops.generated.source.md @@ -43,11 +43,14 @@ Title will be the last part of the branchname split on `/`, so `feature/123-test - `to-branch`: Name of the branch the pull request should be merged into. For instance `develop`, or `main`. ([Text](repository_action_types.md#text)) - `reviewer-ids`: List of reviewer ids. The id should be a valid Azure DevOps user id (i.e. GUID). (List) - `draft-pr`: Boolean specifying if th PR should be marked as draft. ([Predicate](repository_action_types.md#predicate)) -- `include-work-items`: Boolean specifying if workitems should be included in the PR. RepoM will try to resolve the workitems by looping through the commit messages. ([Predicate](repository_action_types.md#predicate)) +- `include-work-items`: Boolean specifying if work items should be included in the PR. RepoM will try to resolve the work items by looping through the commit messages. ([Predicate](repository_action_types.md#predicate)) - `open-in-browser`: Boolean specifying if the Pull request should be opened in the browser after creation. ([Predicate](repository_action_types.md#predicate)) - `context`: The context in which the action is available. ([Context](repository_action_types.md#context)) - `active`: Whether the menu item is enabled. ([Predicate](repository_action_types.md#predicate)) -- `auto-complete`: Auto complete options. Please take a look at the same for more information (AutoCompleteOptionsV1, optional) +- `auto-complete`: Auto complete options. If not provided, auto complete will not be set. + - `merge-strategy`: The merge strategy. Possible values are `no-fast-forward`, `squash`, `rebase`, and `rebase-merge`. + - `delete-source-branch`: Boolean specifying if the source branch should be deleted after completion. ([Predicate](repository_action_types.md#predicate)) + - `transition-work-items`: Boolean specifying if related work items should be transitioned to the next state. ([Predicate](repository_action_types.md#predicate)) ### Example diff --git a/docs/mdsource/repom.generated.source.md b/docs/mdsource/repom.generated.source.md index 803758ef..f29d5e69 100644 --- a/docs/mdsource/repom.generated.source.md +++ b/docs/mdsource/repom.generated.source.md @@ -71,7 +71,7 @@ Action to create a folder (sub menu) in the context menu of the repository allow Properties: -- `actions`: List of actions. (ActionMenu, optional) +- `actions`: List of actions. ([ActionMenu](repository_action_types.md#actions)) - `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)) @@ -94,7 +94,7 @@ Properties: - `enumerable`: The list of items to enumerate on. (Variable) - `variable`: The name of the variable to access to current enumeration of the items. For each iteration, the variable `{var.name}` has the value of the current iteration. (string?, optional) - `skip`: Predicate to skip the current item. ([Predicate](repository_action_types.md#predicate)) -- `actions`: List of repeated actions. (List) +- `actions`: List of repeated actions. ([ActionMenu](repository_action_types.md#actions)) ### Example @@ -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/docs/mdsource/repository_action_types.md b/docs/mdsource/repository_action_types.md deleted file mode 100644 index 7bb57e96..00000000 --- a/docs/mdsource/repository_action_types.md +++ /dev/null @@ -1,103 +0,0 @@ -# Repository Action types - -## Context - -The context type enables you to create or load variables and add some custom scriban methods in order to render [Text](#text) or calculate [Predicats](#predicate). -Currenlty, RepoM supports the following types of context actions which can be added as item to the context. - -- `evaluate-variable@1` A scriban template which, when evaluated, returns a value to be stored as variable. -- `evaluate-script@1` A scriban template which, when evaluated adds 'content' like variables or methods, to the current scriban context. -- `load-file@1` Loads a file (only `.env` or `.yaml`) and processes the content. An environment file is read and all environment variables are stored and accessable. -- `render-variable@1` Renders a scriban template and stores the outcomming text as variable. -- `set-variable@1` Sets a variable with static content. - -## Text - -Text is a scriban template for rendering textual content. These scriban templates can contain mixed content of text and scriban code blocks which are enclosed by `{{` and `}}`. - -### Examples - -For this example, the current repository branch name is `feature/abcdefghi` and the date is the 21st of december in 2023. - -| Input | Output (string) | -|---|---| -| `static text` | static text | -| `static {{ 1 + 2 }} text` | static 3 text | -| `today is {{ date.now \| date.to_string "%Y-%m-%d" }}` | today is 2023-12-21 | -| `this is {{ 42 < 11 && true }}!` | this is false! | -| `Create PR ({{ repository.branch \| string.replace "feature/" "" \| string.truncate 4 ".." }})` | Create PR abcd.. | - -### Internals - -Text uses the following scriban lexer and parser options: - - - -```cs -public static readonly ParserOptions DefaultParserOptions = new() -{ - ExpressionDepthLimit = 100, - LiquidFunctionsToScriban = false, - ParseFloatAsDecimal = default, -}; -``` -snippet source | anchor - - - - -```cs -public static readonly LexerOptions MixedLexer = new() -{ - FrontMatterMarker = LexerOptions.DefaultFrontMatterMarker, - Lang = ScriptLang.Default, - Mode = ScriptMode.Default, -}; -``` -snippet source | anchor - - -## Predicate - -A predicate is a scriban expression resulting in a boolean. Beause it is an expression, RepoM uses the pure scripting mode of scriban (`ScriptOnly` lexer mode) without templating (`{{` and `}}`). In other words, a Predicate is not about rendering text but evaluating a boolean expression. - -### Examples - -| Input | Output (boolean) | -|---|---| -| `true` | true | -| `false` | false | -| `1` | true | -| `0` | false | -| `1 == 2` | false | -| `a = [1, 2, 3]; a.size > 10` | false | -| `file.file_exists(repository.path + "\readme.md")` | true or false depending if file exists | - -### Internals - -Predicate uses the following scriban lexer and parser options: - - - -```cs -public static readonly ParserOptions DefaultParserOptions = new() -{ - ExpressionDepthLimit = 100, - LiquidFunctionsToScriban = false, - ParseFloatAsDecimal = default, -}; -``` -snippet source | anchor - - - - -```cs -public static readonly LexerOptions ScriptOnlyLexer = new() -{ - Lang = ScriptLang.Default, - Mode = ScriptMode.ScriptOnly, -}; -``` -snippet source | anchor - diff --git a/docs/mdsource/repository_action_types.source.md b/docs/mdsource/repository_action_types.source.md index 978f2832..9b5f5b19 100644 --- a/docs/mdsource/repository_action_types.source.md +++ b/docs/mdsource/repository_action_types.source.md @@ -1,5 +1,22 @@ # Repository Action types +## Actions + +Actions are a list of actions. This can be used in a sub menu. + +### Example + +```yaml +action-menu: +- type: folder@1 + actions: + - type: just-text@1 + name: x + - type: url@1 + name: x + # etc. etc. +``` + ## Context The context type enables you to create or load variables and add some custom scriban methods in order to render [Text](#text) or calculate [Predicats](#predicate). diff --git a/docs/plugin_repom.plugin.azuredevops.generated.md b/docs/plugin_repom.plugin.azuredevops.generated.md index f7436726..f142a928 100644 --- a/docs/plugin_repom.plugin.azuredevops.generated.md +++ b/docs/plugin_repom.plugin.azuredevops.generated.md @@ -43,11 +43,14 @@ Title will be the last part of the branchname split on `/`, so `feature/123-test - `to-branch`: Name of the branch the pull request should be merged into. For instance `develop`, or `main`. ([Text](repository_action_types.md#text)) - `reviewer-ids`: List of reviewer ids. The id should be a valid Azure DevOps user id (i.e. GUID). (List) - `draft-pr`: Boolean specifying if th PR should be marked as draft. ([Predicate](repository_action_types.md#predicate)) -- `include-work-items`: Boolean specifying if workitems should be included in the PR. RepoM will try to resolve the workitems by looping through the commit messages. ([Predicate](repository_action_types.md#predicate)) +- `include-work-items`: Boolean specifying if work items should be included in the PR. RepoM will try to resolve the work items by looping through the commit messages. ([Predicate](repository_action_types.md#predicate)) - `open-in-browser`: Boolean specifying if the Pull request should be opened in the browser after creation. ([Predicate](repository_action_types.md#predicate)) - `context`: The context in which the action is available. ([Context](repository_action_types.md#context)) - `active`: Whether the menu item is enabled. ([Predicate](repository_action_types.md#predicate)) -- `auto-complete`: Auto complete options. Please take a look at the same for more information (AutoCompleteOptionsV1, optional) +- `auto-complete`: Auto complete options. If not provided, auto complete will not be set. + - `merge-strategy`: The merge strategy. Possible values are `no-fast-forward`, `squash`, `rebase`, and `rebase-merge`. + - `delete-source-branch`: Boolean specifying if the source branch should be deleted after completion. ([Predicate](repository_action_types.md#predicate)) + - `transition-work-items`: Boolean specifying if related work items should be transitioned to the next state. ([Predicate](repository_action_types.md#predicate)) ### Example diff --git a/docs/repom.generated.md b/docs/repom.generated.md index 81ad6cc4..15cbd5b4 100644 --- a/docs/repom.generated.md +++ b/docs/repom.generated.md @@ -114,7 +114,7 @@ Action to create a folder (sub menu) in the context menu of the repository allow Properties: -- `actions`: List of actions. (ActionMenu, optional) +- `actions`: List of actions. ([ActionMenu](repository_action_types.md#actions)) - `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)) @@ -156,7 +156,7 @@ Properties: - `enumerable`: The list of items to enumerate on. (Variable) - `variable`: The name of the variable to access to current enumeration of the items. For each iteration, the variable `{var.name}` has the value of the current iteration. (string?, optional) - `skip`: Predicate to skip the current item. ([Predicate](repository_action_types.md#predicate)) -- `actions`: List of repeated actions. (List) +- `actions`: List of repeated actions. ([ActionMenu](repository_action_types.md#actions)) ### Example @@ -378,7 +378,7 @@ action-menu: ## 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: @@ -386,7 +386,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/docs/repository_action_types.md b/docs/repository_action_types.md index 66c0d2c1..ba5f6ad0 100644 --- a/docs/repository_action_types.md +++ b/docs/repository_action_types.md @@ -1,5 +1,22 @@ # Repository Action types +## Actions + +Actions are a list of actions. This can be used in a sub menu. + +### Example + +```yaml +action-menu: +- type: folder@1 + actions: + - type: just-text@1 + name: x + - type: url@1 + name: x + # etc. etc. +``` + ## Context The context type enables you to create or load variables and add some custom scriban methods in order to render [Text](#text) or calculate [Predicats](#predicate). diff --git a/src/RepoM.ActionMenu.CodeGen/Constants.cs b/src/RepoM.ActionMenu.CodeGen/Constants.cs index 0e8c56c2..e7897518 100644 --- a/src/RepoM.ActionMenu.CodeGen/Constants.cs +++ b/src/RepoM.ActionMenu.CodeGen/Constants.cs @@ -7,9 +7,16 @@ internal static class Constants { internal static readonly Dictionary TypeInfos = new() { + { + typeof(RepoM.ActionMenu.Core.Yaml.Model.ActionMenus.ActionMenu).FullName!, + new TypeInfoDescriptor(nameof(RepoM.ActionMenu.Core.Yaml.Model.ActionMenus.ActionMenu), typeof(RepoM.ActionMenu.Core.Yaml.Model.ActionMenus.ActionMenu).FullName!) + { + Link = "repository_action_types.md#actions", + } + }, { typeof(Interface.YamlModel.Templating.Text).FullName!, - new TypeInfoDescriptor(nameof(Text), typeof(Interface.YamlModel.Templating.Text).FullName!) + new TypeInfoDescriptor(nameof(Interface.YamlModel.Templating.Text), typeof(Interface.YamlModel.Templating.Text).FullName!) { Link = "repository_action_types.md#text", } diff --git a/src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs b/src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs index 00b9528d..c8bd8a38 100644 --- a/src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs +++ b/src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs @@ -28,9 +28,15 @@ public TypeInfoDescriptor(ITypeSymbol typeSymbol) { Nullable = IsNullableType(typeSymbol); + // hack if (Name.Contains("AutoCompleteOptionsV1")) { - // do nothing intentionally, just for debugging coenm + SkipForDocumentGeneration = true; + } + + if (Name.Contains("PinMode")) + { + SkipForDocumentGeneration = true; } } @@ -65,6 +71,11 @@ public TypeInfoDescriptor(string name, string csharpTypeName) public bool Nullable { get; set; } + /// + /// Skip this type for document generation. + /// + public bool SkipForDocumentGeneration { get; set; } = false; + private static bool IsNullableType(ITypeSymbol typeSymbol) { return typeSymbol is INamedTypeSymbol { NullableAnnotation: NullableAnnotation.Annotated, }; diff --git a/src/RepoM.ActionMenu.CodeGen/Templates/DocsPlugin.scriban-txt b/src/RepoM.ActionMenu.CodeGen/Templates/DocsPlugin.scriban-txt index 2e34680a..c87cbac4 100644 --- a/src/RepoM.ActionMenu.CodeGen/Templates/DocsPlugin.scriban-txt +++ b/src/RepoM.ActionMenu.CodeGen/Templates/DocsPlugin.scriban-txt @@ -1,5 +1,16 @@ {{~ +func write_parenthesis_when_not_empty(s) + if !string.empty s + ret "(" + s + ")" + end + ret "" +end + func write_type_with_link(t) + if t.SkipForDocumentGeneration + ret ""; + end + result = t.Name; if !string.empty t.Link diff --git a/src/RepoM.ActionMenu.CodeGen/Templates/Parts/actionmenu.scriban-txt b/src/RepoM.ActionMenu.CodeGen/Templates/Parts/actionmenu.scriban-txt index 1352165a..9be43556 100644 --- a/src/RepoM.ActionMenu.CodeGen/Templates/Parts/actionmenu.scriban-txt +++ b/src/RepoM.ActionMenu.CodeGen/Templates/Parts/actionmenu.scriban-txt @@ -5,7 +5,12 @@ Properties: {{~ for p in actionmenu_item.ActionMenuProperties ~}} -- `{{ hyphenated p.CSharpName }}`: {{ p.Description }} ({{ write_type_with_link p.ReturnType }}) +- `{{ hyphenated p.CSharpName }}`: {{ p.Description }} {{ write_parenthesis_when_not_empty (write_type_with_link (p.ReturnType)) }} +{{~ if hyphenated(p.CSharpName) == 'auto-complete' ~}} + - `merge-strategy`: The merge strategy. Possible values are `no-fast-forward`, `squash`, `rebase`, and `rebase-merge`. + - `delete-source-branch`: Boolean specifying if the source branch should be deleted after completion. ([Predicate](repository_action_types.md#predicate)) + - `transition-work-items`: Boolean specifying if related work items should be transitioned to the next state. ([Predicate](repository_action_types.md#predicate)) +{{~ end ~}} {{~ end ~}} {{~ if actionmenu_item.Examples ~}} @@ -36,7 +41,7 @@ Properties: {{ example_item.Text }} {{~ else ~}} - NAME NOT FOUND!! {{ example_item.TypeName }}. + NAME NOT FOUND!! {{ example_item.TypeName }}. {{~ end ~}} {{~ end ~}} {{~ end ~}} \ No newline at end of file diff --git a/src/RepoM.ActionMenu.Core/ActionMenu/Model/ActionMenus/Folder/RepositoryActionFolderV1.cs b/src/RepoM.ActionMenu.Core/ActionMenu/Model/ActionMenus/Folder/RepositoryActionFolderV1.cs index bbf09770..acdfdee6 100644 --- a/src/RepoM.ActionMenu.Core/ActionMenu/Model/ActionMenus/Folder/RepositoryActionFolderV1.cs +++ b/src/RepoM.ActionMenu.Core/ActionMenu/Model/ActionMenus/Folder/RepositoryActionFolderV1.cs @@ -25,7 +25,7 @@ public string Type } /// - public ActionMenu? Actions { get; set; } + public ActionMenu Actions { get; set; } = []; /// [Text] diff --git a/src/RepoM.ActionMenu.Core/ActionMenu/Model/ActionMenus/ForEach/RepositoryActionForEachV1.cs b/src/RepoM.ActionMenu.Core/ActionMenu/Model/ActionMenus/ForEach/RepositoryActionForEachV1.cs index 24d20e67..8759293d 100644 --- a/src/RepoM.ActionMenu.Core/ActionMenu/Model/ActionMenus/ForEach/RepositoryActionForEachV1.cs +++ b/src/RepoM.ActionMenu.Core/ActionMenu/Model/ActionMenus/ForEach/RepositoryActionForEachV1.cs @@ -1,7 +1,7 @@ namespace RepoM.ActionMenu.Core.ActionMenu.Model.ActionMenus.ForEach; -using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using RepoM.ActionMenu.Core.Yaml.Model.ActionMenus; using RepoM.ActionMenu.Core.Yaml.Model.Templating; using RepoM.ActionMenu.Interface.YamlModel; using RepoM.ActionMenu.Interface.YamlModel.ActionMenus; @@ -59,12 +59,13 @@ public string Type [Predicate(false)] public Predicate Skip { get; init; } = new ScribanPredicate(); + // /// /// List of repeated actions. /// [Required] - public List Actions { get; init; } = new(); - + public ActionMenu Actions { get; set; } = []; + public override string ToString() { return $"({TYPE_VALUE})"; 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() { diff --git a/src/RepoM.Plugin.AzureDevOps/ActionMenu/Model/ActionMenus/CreatePullRequest/AutoCompleteOptionsV1.cs b/src/RepoM.Plugin.AzureDevOps/ActionMenu/Model/ActionMenus/CreatePullRequest/AutoCompleteOptionsV1.cs index 77ccc140..cf7d5b8a 100644 --- a/src/RepoM.Plugin.AzureDevOps/ActionMenu/Model/ActionMenus/CreatePullRequest/AutoCompleteOptionsV1.cs +++ b/src/RepoM.Plugin.AzureDevOps/ActionMenu/Model/ActionMenus/CreatePullRequest/AutoCompleteOptionsV1.cs @@ -20,14 +20,14 @@ internal class AutoCompleteOptionsV1 public MergeStrategyV1 MergeStrategy { get; set; } = MergeStrategyV1.NoFastForward; // GitHub issue: https://github.com/coenm/RepoM/issues/87 /// - /// Boolean specifying if the source branche should be deleted afer completion. + /// Boolean specifying if the source branch should be deleted after completion. /// [Required] [Predicate(true)] public Predicate DeleteSourceBranch { get; set; } = true; /// - /// Boolean specifying if related workitems should be transitioned to the next state. + /// Boolean specifying if related work items should be transitioned to the next state. /// [Required] [Predicate(true)] diff --git a/src/RepoM.Plugin.AzureDevOps/ActionMenu/Model/ActionMenus/CreatePullRequest/RepositoryActionAzureDevOpsCreatePullRequestV1.cs b/src/RepoM.Plugin.AzureDevOps/ActionMenu/Model/ActionMenus/CreatePullRequest/RepositoryActionAzureDevOpsCreatePullRequestV1.cs index 58851371..2afdac1e 100644 --- a/src/RepoM.Plugin.AzureDevOps/ActionMenu/Model/ActionMenus/CreatePullRequest/RepositoryActionAzureDevOpsCreatePullRequestV1.cs +++ b/src/RepoM.Plugin.AzureDevOps/ActionMenu/Model/ActionMenus/CreatePullRequest/RepositoryActionAzureDevOpsCreatePullRequestV1.cs @@ -69,7 +69,7 @@ public string Type public Predicate DraftPr { get; set; } = false; /// - /// Boolean specifying if workitems should be included in the PR. RepoM will try to resolve the workitems by looping through the commit messages. + /// Boolean specifying if work items should be included in the PR. RepoM will try to resolve the work items by looping through the commit messages. /// [Predicate(true)] public Predicate IncludeWorkItems { get; set; } = true; @@ -88,7 +88,7 @@ public string Type public Predicate Active { get; set; } = true; /// - /// Auto complete options. Please take a look at the same for more information + /// Auto complete options. If not provided, auto complete will not be set. /// public AutoCompleteOptionsV1? AutoComplete { get; set; } diff --git a/tests/RepoM.ActionMenu.CodeGen.Tests/ProgramTests.CompileAndExtractProjectDescription_ShouldReturn_WhenValidProject.verified.txt b/tests/RepoM.ActionMenu.CodeGen.Tests/ProgramTests.CompileAndExtractProjectDescription_ShouldReturn_WhenValidProject.verified.txt index 575ed33e..348ba89a 100644 --- a/tests/RepoM.ActionMenu.CodeGen.Tests/ProgramTests.CompileAndExtractProjectDescription_ShouldReturn_WhenValidProject.verified.txt +++ b/tests/RepoM.ActionMenu.CodeGen.Tests/ProgramTests.CompileAndExtractProjectDescription_ShouldReturn_WhenValidProject.verified.txt @@ -17,7 +17,8 @@ CSharpTypeName: RepoM.ActionMenu.Interface.YamlModel.Templating.Text, Name: Text, Link: repository_action_types.md#text, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.RepositoryActionDummyAbcV1.Name, IsCommand: false, @@ -38,7 +39,8 @@ This property will be used instead of the Name property. CSharpTypeName: RepoM.ActionMenu.Interface.YamlModel.Templating.Text, Name: Text, Link: repository_action_types.md#text, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.RepositoryActionDummyAbcV1.ProjectId, IsCommand: false, @@ -57,7 +59,8 @@ This property will be used instead of the Name property. CSharpTypeName: RepoM.ActionMenu.Interface.YamlModel.Templating.Text, Name: Text, Link: repository_action_types.md#text, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.RepositoryActionDummyAbcV1.PrTitle, IsCommand: false, @@ -66,7 +69,7 @@ This property will be used instead of the Name property. IsConst: false, Description: Pull Request title. When not provided, the title will be defined based on the branch name. -Title will be the last part of the branchname split on `/`, so `feature/123-testBranch` will result in title `123-testBranch`, +Title will be the last part of the branch name split on `/`, so `feature/123-testBranch` will result in title `123-testBranch`, Examples: { Items: [ { @@ -86,7 +89,8 @@ Title will be the last part of the branchname split on `/`, so `feature/123-test CSharpTypeName: RepoM.ActionMenu.Interface.YamlModel.Templating.Text, Name: Text, Link: repository_action_types.md#text, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.RepositoryActionDummyAbcV1.ToBranch, IsCommand: false, @@ -104,7 +108,8 @@ Title will be the last part of the branchname split on `/`, so `feature/123-test ReturnType: { CSharpTypeName: System.Collections.Generic.List, Name: List, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.RepositoryActionDummyAbcV1.ReviewerIds, IsCommand: false, @@ -124,7 +129,8 @@ Title will be the last part of the branchname split on `/`, so `feature/123-test CSharpTypeName: RepoM.ActionMenu.Interface.YamlModel.Templating.Predicate, Name: Predicate, Link: repository_action_types.md#predicate, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.RepositoryActionDummyAbcV1.DraftPr, IsCommand: false, @@ -144,7 +150,8 @@ Title will be the last part of the branchname split on `/`, so `feature/123-test CSharpTypeName: RepoM.ActionMenu.Interface.YamlModel.Templating.Predicate, Name: Predicate, Link: repository_action_types.md#predicate, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.RepositoryActionDummyAbcV1.IncludeWorkItems, IsCommand: false, @@ -164,7 +171,8 @@ Title will be the last part of the branchname split on `/`, so `feature/123-test CSharpTypeName: RepoM.ActionMenu.Interface.YamlModel.Templating.Predicate, Name: Predicate, Link: repository_action_types.md#predicate, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.RepositoryActionDummyAbcV1.OpenInBrowser, IsCommand: false, @@ -183,7 +191,8 @@ Title will be the last part of the branchname split on `/`, so `feature/123-test CSharpTypeName: RepoM.ActionMenu.Interface.YamlModel.ActionMenus.Context?, Name: Context, Link: repository_action_types.md#context, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.RepositoryActionDummyAbcV1.Context, IsCommand: false, @@ -203,7 +212,8 @@ Title will be the last part of the branchname split on `/`, so `feature/123-test CSharpTypeName: RepoM.ActionMenu.Interface.YamlModel.Templating.Predicate, Name: Predicate, Link: repository_action_types.md#predicate, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.RepositoryActionDummyAbcV1.Active, IsCommand: false, @@ -222,7 +232,8 @@ Title will be the last part of the branchname split on `/`, so `feature/123-test ReturnType: { CSharpTypeName: RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.AutoCompleteOptionsV1?, Name: AutoCompleteOptionsV1, - Nullable: true + Nullable: true, + SkipForDocumentGeneration: true }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.RepositoryActionDummyAbcV1.AutoComplete, IsCommand: false, @@ -297,7 +308,8 @@ devops_project_id = "805ACF64-0F06-47EC-96BF-E830895E2740"; ReturnType: { CSharpTypeName: int, Name: int, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: M:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Context.UsageVariables.GetCount(RepoM.ActionMenu.Interface.ActionMenuFactory.IActionMenuGenerationContext), IsCommand: false, @@ -328,7 +340,8 @@ devops_project_id = "805ACF64-0F06-47EC-96BF-E830895E2740"; ReturnType: { CSharpTypeName: int, Name: int, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: M:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Context.UsageVariables.GetOverallCount, IsCommand: false, @@ -371,7 +384,8 @@ devops_project_id = "805ACF64-0F06-47EC-96BF-E830895E2740"; ReturnType: { CSharpTypeName: RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.MergeStrategyV1, Name: MergeStrategyV1, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.AutoCompleteOptionsV1.MergeStrategy, IsCommand: false, @@ -386,7 +400,8 @@ devops_project_id = "805ACF64-0F06-47EC-96BF-E830895E2740"; CSharpTypeName: RepoM.ActionMenu.Interface.YamlModel.Templating.Predicate, Name: Predicate, Link: repository_action_types.md#predicate, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.AutoCompleteOptionsV1.DeleteSourceBranch, IsCommand: false, @@ -401,7 +416,8 @@ devops_project_id = "805ACF64-0F06-47EC-96BF-E830895E2740"; CSharpTypeName: RepoM.ActionMenu.Interface.YamlModel.Templating.Predicate, Name: Predicate, Link: repository_action_types.md#predicate, - Nullable: false + Nullable: false, + SkipForDocumentGeneration: false }, XmlId: P:RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.AutoCompleteOptionsV1.TransitionWorkItems, IsCommand: false, diff --git a/tests/RepoM.ActionMenu.CodeGenDummyLibrary/ActionMenu/Model/ActionMenus/RepositoryActionDummyAbcV1.cs b/tests/RepoM.ActionMenu.CodeGenDummyLibrary/ActionMenu/Model/ActionMenus/RepositoryActionDummyAbcV1.cs index 294646c4..110acf24 100644 --- a/tests/RepoM.ActionMenu.CodeGenDummyLibrary/ActionMenu/Model/ActionMenus/RepositoryActionDummyAbcV1.cs +++ b/tests/RepoM.ActionMenu.CodeGenDummyLibrary/ActionMenu/Model/ActionMenus/RepositoryActionDummyAbcV1.cs @@ -48,7 +48,7 @@ public string Type /// /// Pull Request title. When not provided, the title will be defined based on the branch name. - /// Title will be the last part of the branchname split on `/`, so `feature/123-testBranch` will result in title `123-testBranch` + /// Title will be the last part of the branch name split on `/`, so `feature/123-testBranch` will result in title `123-testBranch` /// /// /// `{{ repository.branch | string.replace "feature/" "" | string.truncate 16 "..." }}`