Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
3324a09
Move AL-Go files to update to settings
mazhelez Oct 16, 2025
75fd6d9
Merge branch 'main' into mazhelez/custom-files
mazhelez Oct 16, 2025
d82b910
Merge branch 'main' of https://github.com/microsoft/AL-Go into mazhel…
mazhelez Oct 17, 2025
2a0bb32
Add schema for updateALGoFiles
mazhelez Oct 17, 2025
a1cba25
Remove variable
mazhelez Oct 17, 2025
88a4a6f
Fix pre-commit issues
mazhelez Oct 17, 2025
c890df8
Merge branch 'main' into mazhelez/custom-files
mazhelez Oct 17, 2025
1f04fb9
Fix tests failing in PS5
mazhelez Oct 20, 2025
c361aaa
Remove mandatory parameter $files
mazhelez Oct 22, 2025
1c308e7
Resolve downloaded template folders
mazhelez Oct 22, 2025
abf5ae3
Fix variable name
mazhelez Oct 22, 2025
76dec4d
Fix variable names
mazhelez Oct 22, 2025
43f5f34
Enrich e2e test for custom templates
mazhelez Oct 22, 2025
5710d35
Merge branch 'main' into mazhelez/custom-files
mazhelez Oct 22, 2025
c2af10e
Move messages to debug
mazhelez Oct 23, 2025
6975e63
Merge branch 'mazhelez/custom-files' of https://github.com/microsoft/…
mazhelez Oct 23, 2025
1d4cb2f
Enhance tests
mazhelez Oct 24, 2025
d81a53c
Fix error with missing sourceFullPath
mazhelez Oct 24, 2025
550b11c
pre-commit fixes
mazhelez Oct 24, 2025
e7aa565
Log improvements
mazhelez Oct 24, 2025
15700ff
Do not fallback to original template for custom template files
mazhelez Oct 24, 2025
a879d03
Merge branch 'main' of https://github.com/microsoft/AL-Go into mazhel…
mazhelez Oct 28, 2025
ccf2fc8
Fix issue when downloading original template
mazhelez Oct 28, 2025
5cb2f3a
Fix contains and add a test
mazhelez Oct 28, 2025
314532d
Merge branch 'main' into mazhelez/custom-files
mazhelez Oct 28, 2025
04acd08
Use relative paths
mazhelez Oct 28, 2025
fbb1abc
Merge branch 'mazhelez/custom-files' of https://github.com/microsoft/…
mazhelez Oct 28, 2025
423bae1
Do not use Resolve-Path as the file might not exist
mazhelez Oct 28, 2025
11d13db
Fix typo
mazhelez Oct 29, 2025
af1e0b8
Recalculate IsDirectALGo if custom template
mazhelez Oct 29, 2025
df3bc19
Merge branch 'main' of https://github.com/microsoft/AL-Go into mazhel…
mazhelez Oct 29, 2025
fa4a310
Improve code comment
mazhelez Oct 29, 2025
7715271
Add check for files from original template
mazhelez Oct 29, 2025
71fdce4
Fix types
mazhelez Oct 29, 2025
fc2f258
Renames, for more clarity
mazhelez Oct 29, 2025
9c4e591
Add logs when skipping custom template-specific files
mazhelez Oct 29, 2025
43c7bf5
Fix failing test
mazhelez Oct 29, 2025
d1851d4
Encapsulate unusedALGoFiles and add tons of tests
mazhelez Oct 29, 2025
9c6cd0e
Remove unused parameter
mazhelez Oct 29, 2025
fda7bfa
Fix settings schema
mazhelez Oct 29, 2025
447b94c
Add test to include custom template files
mazhelez Oct 30, 2025
238ddaa
Add type prop only where needed. Add origin property to differentiate…
mazhelez Oct 30, 2025
ba74db8
Reuse variables
mazhelez Oct 30, 2025
fd5bf30
Revert formatting changes in settings schema
mazhelez Oct 30, 2025
637504c
Remove -Force switch when importing module
mazhelez Oct 30, 2025
db89418
Fix e2e test
mazhelez Oct 30, 2025
2b94623
Formatting
mazhelez Oct 30, 2025
2d2aa7a
Fix pre-commit
mazhelez Oct 30, 2025
b78dbc6
Remove includeBuildPP variable and calculate it when needed
mazhelez Oct 30, 2025
516922f
Remove $type
mazhelez Oct 30, 2025
6654920
Add logging
mazhelez Oct 30, 2025
42de096
Make destinationFolder mandatory
mazhelez Oct 30, 2025
1909b22
Filter workflow files better
mazhelez Oct 30, 2025
aa714ec
Add defensive check for when the parent folder is the root folder
mazhelez Oct 30, 2025
ef7f7dc
Rename updateALGoFiles => customALGoFiles
mazhelez Oct 30, 2025
7369d17
Add docs
mazhelez Oct 30, 2025
432ea51
Fix relative paths in e2e test
mazhelez Oct 30, 2025
0a03c23
Update Scenarios/CustomizingALGoForGitHub.md
mazhelez Oct 31, 2025
bc92fbb
Update Scenarios/settings.md
mazhelez Oct 31, 2025
22b511e
Merge branch 'main' into mazhelez/custom-files
mazhelez Nov 11, 2025
cda01b5
Move workflow-specific lines
mazhelez Nov 12, 2025
bb32e7d
Merge branch 'main' into mazhelez/custom-files
mazhelez Nov 12, 2025
34006c7
Refactor ResolveFilePaths function to improve uniqueness logic and up…
mazhelez Nov 17, 2025
6f07b7d
Update documentation for custom template files to clarify file syncin…
mazhelez Nov 17, 2025
0cc9e6f
Fix e2e test
mazhelez Nov 17, 2025
646f103
Fix line endings in custom workflow and file content checks in runtes…
mazhelez Nov 18, 2025
8cd4177
Simplify destination name assignment in ResolveFilePaths function
mazhelez Nov 18, 2025
5680d21
Refactor ResolveFilePaths function to improve variable naming and cla…
mazhelez Nov 18, 2025
a100272
Rename 'sourcePath' and 'destinationPath' to 'sourceFolder' and 'dest…
mazhelez Nov 18, 2025
512cb4a
Enhance documentation for ResolveFilePaths function with detailed SYN…
mazhelez Nov 18, 2025
f0c108c
Update deprecation warnings for unusedALGoSystemFiles setting and mar…
mazhelez Nov 18, 2025
09a7eed
Fix precommit issues
mazhelez Nov 18, 2025
18786ac
Fix e2e test
mazhelez Nov 18, 2025
4133ffe
Add scenariosFilter input to E2E workflow for selective scenario exec…
mazhelez Nov 18, 2025
6e501bb
Fix scenarios filtering
mazhelez Nov 18, 2025
66382b7
Merge branch 'main' into mazhelez/custom-files
mazhelez Nov 18, 2025
a702115
Fix array wrapping for scenarios in E2E workflow
mazhelez Nov 18, 2025
8a5d7e2
Add summary table for file update and exclusion management in AL-Go f…
mazhelez Nov 18, 2025
9b8e78c
Enhance GetFilesToUpdate function documentation with detailed file re…
mazhelez Nov 18, 2025
4a62d50
Refine file exclusion logic in GetFilesToUpdate function to ensure on…
mazhelez Nov 19, 2025
355f1f0
Enhance documentation for file update and exclusion management in AL-…
mazhelez Nov 19, 2025
d72da45
Fix formatting inconsistencies in the summary table for file update a…
mazhelez Nov 19, 2025
ba44392
Merge branch 'main' of https://github.com/microsoft/AL-Go into mazhel…
mazhelez Nov 20, 2025
90d4809
Enhance schema and documentation for file update and exclusion config…
mazhelez Nov 20, 2025
2895c48
Add duplicate file checks in ResolveFilePaths function and update rel…
mazhelez Nov 20, 2025
0cd8881
Update CustomizingALGoForGitHub.md to clarify default sync behavior f…
mazhelez Nov 20, 2025
fa666c6
Add source folder validation in ResolveFilePaths function and corresp…
mazhelez Nov 20, 2025
e24ec41
Rename 'filesToUpdate' to 'filesToInclude' across multiple files, upd…
mazhelez Nov 20, 2025
1750f8b
Add tests for ResolveFilePaths and GetFilesToUpdate to handle empty p…
mazhelez Nov 20, 2025
02b9f7a
Refactor ResolveFilePaths and GetFilesToUpdate functions to replace W…
mazhelez Nov 21, 2025
5b626e7
Update ResolveFilePaths to return an array and enhance tests for null…
mazhelez Nov 21, 2025
a0b5704
Rename GetDefaultFilesToUpdate to GetDefaultFilesToInclude for clarit…
mazhelez Nov 21, 2025
85ee213
Add tests for ResolveFilePaths and GetFilesToUpdate to handle various…
mazhelez Nov 21, 2025
6fe050c
Remove duplicate tests
mazhelez Nov 24, 2025
27b45d5
Rename GetDefaultFilesToUpdate to GetDefaultFilesToInclude for clarit…
mazhelez Nov 24, 2025
2f24197
Add OutputArray function for formatted array output and deprecate Out…
mazhelez Nov 24, 2025
bc0f3c0
Fix indentation for filesToInclude property in settings schema
mazhelez Nov 24, 2025
6a289b0
Fix import path formatting in CheckForUpdates.Action.Test.ps1
mazhelez Nov 24, 2025
53b4f02
Add deprecation notice for unusedALGoSystemFiles in RELEASENOTES.md
mazhelez Nov 24, 2025
da18daf
Fix URL formatting for customALGoFiles in DEPRECATIONS.md and RELEASE…
mazhelez Nov 24, 2025
2e30472
Merge branch 'main' into mazhelez/custom-files
mazhelez Nov 24, 2025
886be0b
Fix formatting in test file
mazhelez Nov 24, 2025
2daaead
Merge branch 'mazhelez/custom-files' of https://github.com/microsoft/…
mazhelez Nov 24, 2025
2f1398b
Attempt to fix PSScriptAnalyzer issue
mazhelez Nov 24, 2025
2291a99
Fix variable suppression messages in CheckForUpdates.Action tests
mazhelez Nov 24, 2025
4f97656
Fix whitespace issue in CheckForUpdates.Action test file
mazhelez Nov 24, 2025
599481b
Add telemetry logging for custom AL-Go files usage in GetFilesToUpdat…
mazhelez Nov 24, 2025
29d651e
Merge branch 'main' into mazhelez/custom-files
mazhelez Nov 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/E2E.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ on:
description: Run the end to end scenario tests
type: boolean
default: true
scenariosFilter:
description: Filter to run specific scenarios (separated by comma)
required: false
type: string
default: '*'
runUpgradeTests:
description: Run the end to end upgrade tests
type: boolean
Expand Down Expand Up @@ -169,6 +174,7 @@ jobs:
id: Analyze
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
_scenariosFilter: ${{ github.event.inputs.scenariosFilter }}
run: |
$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
$modulePath = Join-Path "." "e2eTests\e2eTestHelper.psm1" -resolve
Expand Down Expand Up @@ -222,9 +228,13 @@ jobs:
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "releases=$releasesJson"
Write-Host "releases=$releasesJson"

$scenariosFilter = "$($env:_scenariosFilter)" -split ',' | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne '' }
$allScenarios = @(Get-ChildItem -Path (Join-Path $ENV:GITHUB_WORKSPACE "e2eTests/scenarios/*/runtest.ps1") | ForEach-Object { $_.Directory.Name })
$filteredScenarios = $allScenarios | Where-Object { $scenario = $_; $scenariosFilter | ForEach-Object { $scenario -like $_ } }

$scenariosJson = @{
"matrix" = @{
"include" = @(Get-ChildItem -path (Join-Path $ENV:GITHUB_WORKSPACE "e2eTests/scenarios/*/runtest.ps1") | ForEach-Object { @{ "Scenario" = $_.Directory.Name } } )
"include" = @($filteredScenarios | ForEach-Object { @{ "Scenario" = $_ } })
};
"max-parallel" = $maxParallel
"fail-fast" = $false
Expand Down
52 changes: 51 additions & 1 deletion Actions/.Modules/DebugLogHelper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -214,5 +214,55 @@ function OutputDebug {
}
}

Export-ModuleMember -Function OutputColor, OutputDebugFunctionCall, OutputGroupStart, OutputGroupEnd, OutputError, OutputWarning, OutputNotice, MaskValueInLog, OutputDebug
<#
.SYNOPSIS
Outputs each item in an array to the console with optional formatting.
.DESCRIPTION
Outputs each item in an array to the console. An optional formatter script block can be provided to customize the output format of each item.
If a message is provided, it is output before the array items. If the array is empty or null, it outputs "- None".
.PARAMETER Message
An optional message to output before the array items.
.PARAMETER Array
The array of items to output.
.PARAMETER Formatter
An optional script block to format each item in the array.
.PARAMETER Debug
A switch indicating whether to output messages as debug messages.
#>
function OutputArray {
Param(
[string] $Message,
[object[]] $Array,
[scriptblock] $Formatter = { "- $_" },
[switch] $Debug
)

function OutputMessage {
Param(
[string] $Message,
[switch] $Debug
)

if ($Debug) {
OutputDebug $Message
}
else {
Write-Host $Message
}
}

if($Message) {
OutputMessage $Message -Debug:$Debug
}
if (!$Array) {
OutputMessage "- None" -Debug:$Debug
}
else {
$Array | ForEach-Object {
OutputMessage "$(& $Formatter $_)" -Debug:$Debug
}
}
}

Export-ModuleMember -Function OutputColor, OutputDebugFunctionCall, OutputGroupStart, OutputGroupEnd, OutputError, OutputWarning, OutputNotice, MaskValueInLog, OutputDebug, OutputArray
Export-ModuleMember -Variable debugLoggingEnabled
21 changes: 16 additions & 5 deletions Actions/.Modules/ReadSettings.psm1
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
Import-Module (Join-Path -Path $PSScriptRoot "DebugLogHelper.psm1")

$ALGoFolderName = '.AL-Go'
$ALGoSettingsFile = Join-Path '.AL-Go' 'settings.json'
$RepoSettingsFile = Join-Path '.github' 'AL-Go-Settings.json'
$CustomTemplateRepoSettingsFile = Join-Path '.github' 'AL-Go-TemplateRepoSettings.doNotEdit.json'
$CustomTemplateProjectSettingsFile = Join-Path '.github' 'AL-Go-TemplateProjectSettings.doNotEdit.json'
$ALGoSettingsFileName = 'settings.json'
$ALGoSettingsFile = Join-Path '.AL-Go' $ALGoSettingsFileName

$RepoSettingsFileName = 'AL-Go-Settings.json'
$RepoSettingsFile = Join-Path '.github' $RepoSettingsFileName

$CustomTemplateRepoSettingsFileName = 'AL-Go-TemplateRepoSettings.doNotEdit.json'
$CustomTemplateRepoSettingsFile = Join-Path '.github' $CustomTemplateRepoSettingsFileName

$CustomTemplateProjectSettingsFileName = 'AL-Go-TemplateProjectSettings.doNotEdit.json'
$CustomTemplateProjectSettingsFile = Join-Path '.github' $CustomTemplateProjectSettingsFileName

function MergeCustomObjectIntoOrderedDictionary {
Param(
Expand Down Expand Up @@ -242,6 +249,10 @@ function GetDefaultSettings
"shortLivedArtifactsRetentionDays" = 1 # 0 means use GitHub default
"reportSuppressedDiagnostics" = $false
"workflowDefaultInputs" = @()
"customALGoFiles" = [ordered]@{
"filesToInclude" = @()
"filesToExclude" = @()
}
}
}

Expand Down Expand Up @@ -610,4 +621,4 @@ function SanitizeWorkflowName {
}

Export-ModuleMember -Function ReadSettings
Export-ModuleMember -Variable ALGoFolderName, ALGoSettingsFile, RepoSettingsFile, CustomTemplateRepoSettingsFile, CustomTemplateProjectSettingsFile
Export-ModuleMember -Variable ALGoFolderName, ALGoSettingsFile, RepoSettingsFile, CustomTemplateRepoSettingsFile, CustomTemplateProjectSettingsFile, RepoSettingsFileName, ALGoSettingsFileName, CustomTemplateRepoSettingsFileName, CustomTemplateProjectSettingsFileName
46 changes: 46 additions & 0 deletions Actions/.Modules/settings.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,52 @@
"type": "boolean",
"description": "Report suppressed diagnostics. See https://aka.ms/ALGoSettings#reportsuppresseddiagnostics"
},
"customALGoFiles": {
"description": "An object containing the custom AL-Go files configuration. See https://aka.ms/ALGoSettings#customALGoFiles",
"type": "object",
"properties": {
"filesToInclude": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sourceFolder": {
"type": "string",
"description": "The source folder from which to update files, relative to the template repository root."
},
"filter": {
"type": "string",
"description": "A filter string to select which files to update. It can contain '*' and '?' wildcards."
},
"destinationFolder": {
"type": "string",
"description": "The destination folder where the files should be updated, relative to the repository root. If not specified, defaults to the same as the source file folder."
},
"perProject": {
"type": "boolean",
"description": "Indicates whether the file update should be applied per project. In that case, the destinationFolder is considered relative to each project folder."
}
}
}
},
"filesToExclude": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sourceFolder": {
"type": "string",
"description": "The source folder from which to exclude files, relative to the template repository root."
},
"filter": {
"type": "string",
"description": "A filter string to select which files to exclude. It can contain '*' and '?' wildcards."
}
}
}
}
}
},
"workflowDefaultInputs": {
"type": "array",
"items": {
Expand Down
6 changes: 6 additions & 0 deletions Actions/AL-Go-Helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2184,6 +2184,12 @@ function ConnectAz {
}
}

<#
.SYNOPSIS
Output a message and an array of strings in a formatted way.

Deprecated: Use OutputArray function from DebugLogHelper module.
#>
function OutputMessageAndArray {
Param(
[string] $message,
Expand Down
Loading
Loading