Avoid CI/CD runs for template SHA-only system updates - #2379
Open
Alexander Holstrup (aholstrup1) wants to merge 2 commits into
Open
Alexander Holstrup (aholstrup1) wants to merge 2 commits into
Alexander Holstrup (aholstrup1) wants to merge 2 commits into
Conversation
Preserve the recorded template SHA when system files and the template URL are unchanged, reusing the existing no-change commit handling. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Alexander Holstrup (aholstrup1)
requested a review
from a team
as a code owner
September 22, 2026 12:26
Copilot started reviewing on behalf of
Alexander Holstrup (aholstrup1)
September 22, 2026 12:26
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused implementation matches the described behavior and includes cross-platform regression coverage for relevant update paths.
Review effort: Balanced
Findings: None
What changed in this PR
Prevents SHA-only template updates from creating unnecessary commits, pull requests, and CI/CD runs.
Changes:
- Retains the last applied template SHA when system files are unchanged.
- Adds regression coverage for no-op and real update scenarios.
- Documents the behavior and release impact.
| File | Description |
|---|---|
Actions/CheckForUpdates/CheckForUpdates.ps1 |
Preserves the existing SHA for no-op updates. |
Tests/CheckForUpdates.Action.Test.ps1 |
Adds comprehensive regression tests. |
Scenarios/UpdateAlGoSystemFiles.md |
Documents no-op update behavior. |
RELEASENOTES.md |
Records the issue resolution. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Add targeted suppressions for variables consumed by cleanup and mock script blocks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
spetersenms
approved these changes
Sep 22, 2026
Alexander Holstrup (aholstrup1)
enabled auto-merge (squash)
September 22, 2026 12:49
Alexander Holstrup (aholstrup1)
requested a review
from Maria Zhelezova (mazhelez)
September 22, 2026 12:51
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
An empty commit in a template repository currently causes Update AL-Go System Files to commit a new
templateShato the consuming repository, triggering CI/CD even though no system files changed.When there are no file updates or removals, the persisted template URL matches, and a template SHA already exists, retain the original SHA. The updater continues through the existing
CommitFromNewFolderno-change handling instead of returning early. Real updates, removals, template switches, and metadata initialization still follow the normal update path.The SHA remains pinned to the last applied revision rather than the latest checked revision. CI/CD path filters are unchanged.
Regression coverage includes SHA-only updates in direct-commit and PR modes, real file and settings changes, removals, template switches, and missing metadata. All 106 tests in
CheckForUpdates.Action.Test.ps1pass on PowerShell 5.1 and 7.6.Related to issue: #2358
Fixes: #2358
✅ Checklist