Fix merge conflict checker for empty file lists and filter *.cs files by Copilot · Pull Request #26365 · PowerShell/PowerShell
- Remove mandatory parameter constraint on $File in Test-MergeConflictMarker - Add [AllowEmptyCollection()] attribute and default empty array - Handle empty file list gracefully (e.g., when PR only deletes files) - Filter out *.cs files from merge conflict checking - Ensure action wraps ConvertFrom-Json result in @() to handle empty JSON arrays - Update README to document new behavior Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix CI failure in merge conflict checker action
Fix merge conflict checker for empty file lists and filter *.cs files
Changed $writeNoFilesOutput from a scriptblock variable to a proper nested function Write-NoFilesOutput with explicit parameters for better code clarity and maintainability. Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Updated test to match new behavior where empty arrays are handled gracefully instead of throwing an error. This supports delete-only PRs. The test now verifies: - Empty arrays are accepted without error - Proper GitHub Actions outputs are generated (files-checked=0, conflicts-found=0) - Summary contains "No Files to Check" message Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Copilot AI review requested due to automatic review settings
TravisEz13 added a commit to TravisEz13/PowerShell that referenced this pull request
…PowerShell#26365) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
adityapatwardhan pushed a commit to adityapatwardhan/PowerShell that referenced this pull request
…PowerShell#26365) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
SIRMARGIN pushed a commit to SIRMARGIN/PowerShell that referenced this pull request
…PowerShell#26365) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
kilasuit pushed a commit to kilasuit/PowerShell that referenced this pull request
…PowerShell#26365) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
TravisEz13
deleted the
copilot/fix-ci-failure-merge-checker
branch
daxian-dbw pushed a commit to daxian-dbw/PowerShell that referenced this pull request
…PowerShell#26365) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
JustinGrote pushed a commit to JustinGrote/PowerShell that referenced this pull request
…PowerShell#26365) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>