[release/v7.6] Add merge conflict marker detection to linux-ci workflow and refactor existing actions to use reusable get-changed-files action#26530
Conversation
… existing actions to use reusable get-changed-files action (PowerShell#26350) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com> Co-authored-by: Travis Plunk <travis.plunk@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Travis Plunk (HE/HIM) <tplunk@ntdev.microsoft.com>
There was a problem hiding this comment.
Pull request overview
This backport PR adds merge conflict marker detection to the linux-ci workflow and introduces a new Install-CIPester function to standardize Pester module installation across CI jobs. The PR includes comprehensive test coverage for the new functionality and adds guidance documentation for PowerShell code organization and automatic variable naming conventions.
Key Changes:
- New
Test-MergeConflictMarkerfunction intools/ci.psm1to detect Git merge conflict markers - New
Install-CIPesterfunction to standardize Pester installation - New GitHub Actions composite action for merge conflict checking
- Infrastructure tests job added to linux-ci workflow
- Documentation files for PowerShell code organization and naming conventions
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Move linux_packaging job before ready_to_merge to fix the workflow validation error. Jobs must be defined before they are referenced in needs sections. Fixes #26530 Co-authored-by: adityapatwardhan <12820925+adityapatwardhan@users.noreply.github.com>

Backport of #26350 to release/v7.6
Triggered by @TravisEz13 on behalf of @copilot-swe-agent
Original CL Label: CL-Tools
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Adds merge conflict marker detection to the linux-ci workflow to prevent accidental commits with unresolved merge conflict markers. Also refactors existing actions to use the reusable get-changed-files action for better maintainability.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Verified by:
Risk
REQUIRED: Check exactly one box.
Medium risk: Adds new CI workflow jobs and GitHub Actions, but these are non-blocking checks that detect issues without preventing merges. Changes are isolated to workflow definitions and test infrastructure, with minimal impact on production code.
Merge Conflicts
File:
.github/workflows/linux-ci.ymlready_to_mergejobmerge_conflict_checkandinfrastructure_testsjobs from the backport to the release branch's existinglinux_packagingjob