Add support for conditional settings based on GitHub event triggers#2238
Open
ChrisBlankDe wants to merge 2 commits intomicrosoft:mainfrom
Open
Add support for conditional settings based on GitHub event triggers#2238ChrisBlankDe wants to merge 2 commits intomicrosoft:mainfrom
ChrisBlankDe wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for using the GitHub Actions event name as a ConditionalSettings selector in ReadSettings, so AL-Go settings can vary by trigger type such as push, pull_request, schedule, or workflow_dispatch.
Changes:
- Added a new
-triggerparameter toReadSettingsand includedtriggersin conditional-settings evaluation. - Extended
ReadSettingstests to cover matching and non-matching trigger conditions. - Updated settings documentation and release notes to describe the new
triggerscondition.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Tests/ReadSettings.Test.ps1 |
Adds unit coverage for trigger-based conditional settings. |
Scenarios/settings.md |
Documents triggers as a supported conditional-settings selector. |
RELEASENOTES.md |
Announces the new trigger-based conditional settings support. |
Actions/.Modules/ReadSettings.psm1 |
Implements trigger-aware conditional settings in ReadSettings. |
aholstrup1
approved these changes
May 5, 2026
Collaborator
aholstrup1
left a comment
There was a problem hiding this comment.
Looks like there are some failing tests. Otherwise looks good to me 👍
mazhelez
approved these changes
May 6, 2026
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 adds support for using workflow trigger events as a condition in
ConditionalSettings, allowing you to apply settings based on the GitHub Actions event type (e.g.,push,pull_request,schedule,workflow_dispatch). Documentation and tests are updated to reflect this new feature.Conditional settings enhancements:
triggerscondition toConditionalSettings, enabling settings to be applied based on the value ofGITHUB_EVENT_NAME(such aspush,pull_request,schedule,workflow_dispatch)Documentation updates:
settings.mdandRELEASENOTES.mdto document the newtriggerscondition, including usage examples.Test coverage:
ReadSettings.Test.ps1to verify correct behavior when using the newtriggerscondition inConditionalSettings.Related to issue: #2207
✅ Checklist