Skip to content

Decouple PowerShell custom-field workflows from Ninja cmdlets via compatibility shim#2

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/remove-ninja-dependency
Draft

Decouple PowerShell custom-field workflows from Ninja cmdlets via compatibility shim#2
Copilot wants to merge 2 commits intomainfrom
copilot/remove-ninja-dependency

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 24, 2026

PowerShell workflows currently assume Ninja-specific Ninja-Property-* cmdlets exist, which breaks execution outside Ninja environments. This change removes that hard dependency by introducing a shared compatibility layer while preserving existing script behavior and call patterns.

  • Compatibility layer for custom-field operations

    • Added Powershell Scripts/CustomFieldCompatibility.ps1.
    • Defines fallback implementations for:
      • Ninja-Property-Set / Ninja-Property-Get
      • Ninja-Property-Options
      • Ninja-Property-Docs-Set / Ninja-Property-Docs-Get
      • Ninja-Property-Docs-Options
    • Fallbacks are conditionally loaded only when native Ninja cmdlets are unavailable.
  • Repository-wide script integration

    • Updated PowerShell scripts that call Ninja-Property-* to dot-source the shared shim:
      • . "$PSScriptRoot/CustomFieldCompatibility.ps1"
    • Kept existing per-script logic, parameter contracts, and output/reporting behavior unchanged.
  • Behavioral intent

    • In Ninja: native cmdlets continue to be used.
    • Outside Ninja: scripts execute against compatibility implementations instead of failing on missing cmdlets.
# Added near top of Ninja-property-dependent scripts
. "$PSScriptRoot/CustomFieldCompatibility.ps1"

# Existing calls remain unchanged
Set-NinjaProperty -Name $CustomFieldName -Value $Value
$threshold = Ninja-Property-Get -Name $FromCustomField
Original prompt

Make my powershell in my workflows repo non ninja dependent. Remove all references but keep similar functions to what is being done everywhere and make sure it is all functional


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ents

Co-authored-by: OwenIbarra <156828136+OwenIbarra@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove ninja dependency from PowerShell workflows Decouple PowerShell custom-field workflows from Ninja cmdlets via compatibility shim Feb 24, 2026
Copilot AI requested a review from OwenIbarra February 24, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants