Repository navigation
Optional builds for PR validation - #2449
Open
Chris Blank (ChrisBlankDe) wants to merge 8 commits into
Open
Chris Blank (ChrisBlankDe) wants to merge 8 commits into
Chris Blank (ChrisBlankDe) wants to merge 8 commits into
Conversation
- Updated PullRequestHandler.yaml in both AppSource and Per Tenant Extension templates to include a checkout step with LFS support and read settings using the AL-Go-Actions. - Modified PullRequestStatusCheck action to accept optional patterns for PR validation, improving flexibility in handling build failures. - Expanded tests in PullRequestStatusCheck.Test.ps1 to cover scenarios for optional build failures and their handling. - Enhanced ReadSettings.Action.Test.ps1 to include tests for optional patterns in settings, ensuring they are correctly processed and merged from various sources. - Added new tests in ReadSettings.Test.ps1 to validate the default behavior of optional patterns and their merging logic from organization and repository settings. microsoft#2298
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the configurable optional PR build checks.
No open issues 🎉
What changed in this PR
Adds configurable optional build failures to AL-Go’s aggregate Pull Request Status Check for PTE and AppSource repositories, including merge-queue validation. All builds remain required by default.
Changes:
- Adds
optionalPatternForPrValidationwith wildcard matching restricted to eligible build-job names. - Wires settings into both PR workflow templates and reports matching failures as non-blocking warnings.
- Adds validation and settings tests, usage documentation, and release notes.
| File | Description |
|---|---|
| Tests/ReadSettings.Test.ps1 | Tests defaults, schema, merging, and empty-array overrides. |
| Tests/ReadSettings.Action.Test.ps1 | Tests optional-pattern exports through the settings action. |
| Tests/PullRequestStatusCheck.Test.ps1 | Tests optional failures, required jobs, matching, and invalid inputs. |
| Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml | Reads settings and passes patterns to the aggregate check. |
| Templates/AppSource App/.github/workflows/PullRequestHandler.yaml | Adds equivalent settings wiring for AppSource repositories. |
| Scenarios/settings.md | Documents configuration, matching rules, and branch-protection implications. |
| RELEASENOTES.md | Announces optional PR builds and the required system-file update. |
| Actions/PullRequestStatusCheck/README.md | Documents the new action input and behavior. |
| Actions/PullRequestStatusCheck/PullRequestStatusCheck.ps1 | Validates patterns and separates optional from required failures. |
| Actions/PullRequestStatusCheck/action.yaml | Declares and forwards the JSON patterns input. |
| Actions/.Modules/settings.schema.json | Defines the setting as a string array with an empty default. |
| Actions/.Modules/ReadSettings.psm1 | Adds the empty-array runtime default. |
Review effort: Balanced
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Making Settings mandatory breaks existing PullRequestHandler workflows because their StatusCheck jobs do not receive initialization settings, causing aggregate checks to fail even when optional builds are not enabled.
1 open issue
Review effort: Balanced
Co-authored-by: Copilot App <[email protected]>
spetersenms
reviewed
Nov 24, 2026
This branch has not been deployed
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
The new
optionalPatternsForPrValidationsetting (default[]) lets PTE and AppSource repositories make selected build-matrix failures non-blocking for the aggregate Pull Request Status Check, including merge-group runs.Case-insensitive PowerShell wildcard patterns match full GitHub job names. Eligible names must also match
Build * (*) / * (*); custom jobs following this convention also qualify. Optional failures emit warnings, while other failed jobs remain blocking. Individual optional jobs and the workflow run can still be red, so rulesets should require the aggregate check.The StatusCheck job checks out the build ref and reads settings. The action consumes
Settingsdirectly and exposesfailedOptionalJobsas a JSON array of failed optional job names ([]when none qualify). Later steps can consume it, or a job can expose it as a job output. The output is also written when required failures cause the check to fail.Update AL-Go system files to use the new workflow wiring.
Related to issue: #2298
✅ Checklist