Skip to content

Conversation

@TravisEz13
Copy link
Member

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

  • Required tooling change
  • Optional tooling change (include reasoning)

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

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Verified by:

  1. Running merge-conflict-checker action on test files with and without conflict markers
  2. Confirming infrastructure tests execute successfully in CI
  3. Testing on release/v7.6 branch to ensure workflow compatibility

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

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.yml

  • Conflict Type: Job dependency list differences
  • Cause: Release branch had different job dependencies in the ready_to_merge job
  • Resolution: Kept all dependencies from both branches - added merge_conflict_check and infrastructure_tests jobs from the backport to the release branch's existing linux_packaging job

… 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>
Copilot AI review requested due to automatic review settings November 25, 2025 22:05
@TravisEz13 TravisEz13 requested review from a team and jshigetomi as code owners November 25, 2025 22:05
@TravisEz13 TravisEz13 added the CL-Tools Indicates that a PR should be marked as a tools change in the Change Log label Nov 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-MergeConflictMarker function in tools/ci.psm1 to detect Git merge conflict markers
  • New Install-CIPester function 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
File Description
.github/workflows/linux-ci.yml Contains unresolved merge conflicts - Added merge_conflict_check and infrastructure_tests jobs with duplicate dependency entries
tools/ci.psm1 Added Test-MergeConflictMarker and Install-CIPester functions for CI validation
test/infrastructure/ciModule.Tests.ps1 Comprehensive Pester tests for new CI module functions
.github/actions/infrastructure/merge-conflict-checker/action.yml New composite action for detecting merge conflict markers in PRs
.github/actions/infrastructure/merge-conflict-checker/README.md Documentation for merge conflict checker action
.github/actions/test/linux-packaging/action.yml Updated to use Install-CIPester for standardized Pester installation
.github/workflows/macos-ci.yml Added Pester installation step using Install-CIPester
.vsts-ci/templates/nanoserver.yml File removed
.github/instructions/powershell-module-organization.instructions.md New documentation for PowerShell code organization guidelines
.github/instructions/powershell-automatic-variables.instructions.md New documentation for PowerShell automatic variable naming conventions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Review - Needed The PR is being reviewed label Dec 3, 2025
@microsoft-github-policy-service
Copy link
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

Copilot AI added a commit that referenced this pull request Dec 5, 2025
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>
@adityapatwardhan adityapatwardhan merged commit e7132af into PowerShell:release/v7.6 Dec 6, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Tools Indicates that a PR should be marked as a tools change in the Change Log Review - Needed The PR is being reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants