Add support for importantSettings to override lower priority settings#2293
Open
ChrisBlankDe wants to merge 6 commits into
Open
Add support for importantSettings to override lower priority settings#2293ChrisBlankDe wants to merge 6 commits into
ChrisBlankDe wants to merge 6 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds an importantSettings mechanism to AL-Go’s settings merge logic so selected settings can be “protected” during multi-source settings resolution, and documents the new behavior across schema + docs + release notes with accompanying Pester tests.
Changes:
- Extend settings merge logic to recognize an
importantSettingslist and prevent overriding of protected (non-array) settings. - Add Pester tests covering important setting protection, interaction with arrays/
overwriteSettings, and conditional settings. - Update schema and documentation (
settings.md,RELEASENOTES.md) to describe the new setting and expected behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Actions/.Modules/ReadSettings.psm1 | Implements important-setting tracking in the merge pipeline. |
| Actions/.Modules/settings.schema.json | Adds importantSettings to the settings schema with defaults/description. |
| Tests/ReadSettings.Test.ps1 | Adds test coverage for the important-setting merge semantics. |
| Scenarios/settings.md | Documents importantSettings behavior and examples. |
| RELEASENOTES.md | Adds release note entry describing the new capability. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
❔What, Why & How
This pull request introduces a new
importantSettingsmechanism that allows you to protect specific settings from being overridden by lower-priority sources in the AL-Go settings hierarchy. The implementation ensures that settings marked as important can only be overridden by lower-priority sources if those sources also explicitly mark the same setting as important. This applies to both standard and conditional settings, and integrates with the existingoverwriteSettingsmechanism. Documentation and schema files are updated to reflect this new feature.Important settings protection:
importantSettingsarray in settings files, enabling top-level settings to be protected from non-important overrides by lower-priority sources. The merging logic inMergeCustomObjectIntoOrderedDictionarywas updated to enforce this rule for both direct and conditional settings, and to ensure that array settings are always merged. [1] [2] [3] [4]Schema and documentation updates:
settings.schema.jsonto add theimportantSettingsproperty and clarified the behavior ofoverwriteSettingswhen important settings are involved. [1] [2] [3] [4]importantSettingsinRELEASENOTES.mdandScenarios/settings.md. [1] [2]Other improvements:
importantSettingsto the default settings returned byGetDefaultSettings.These changes make it easier to enforce organization- or repository-level settings and prevent accidental overrides from lower-priority sources, while maintaining flexibility for advanced scenarios.
Related to issue: #
✅ Checklist