skills/contributor-profile/assets/contributor-profile.hooks.json
|
{ "hooks": { "PostToolUse": [ { "type": "command", "timeout": 20, "command": "pwsh -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command \"try { Set-Variable -Name CopilotAtelierHook -Value (Get-Item -ErrorAction SilentlyContinue -LiteralPath ([IO.Path]::Combine('/', ([string][Environment]::GetEnvironmentVariable('PLUGIN_ROOT')).PadLeft(1, [char]42), 'com.github.copilot/hooks/scripts/Add-FamiliarityContext.ps1')), ([IO.Path]::Combine('/', ([string][Environment]::GetEnvironmentVariable('USERPROFILE')).PadLeft(1, [char]42), '.copilot/hooks/scripts/Add-FamiliarityContext.ps1')), ([IO.Path]::Combine('/', ([string][Environment]::GetEnvironmentVariable('HOME')).PadLeft(1, [char]42), '.copilot/hooks/scripts/Add-FamiliarityContext.ps1')), ([IO.Path]::Combine('/', ([string][Environment]::GetFolderPath('UserProfile')).PadLeft(1, [char]42), '.copilot/hooks/scripts/Add-FamiliarityContext.ps1')) | Select-Object -First 1 -ExpandProperty FullName); if (-not (Get-Variable -Name CopilotAtelierHook -ValueOnly)) { throw 'could not resolve the script under PLUGIN_ROOT, USERPROFILE, HOME or the user profile folder' }; & (Get-Variable -Name CopilotAtelierHook -ValueOnly); exit (Get-Variable -Name LASTEXITCODE -ValueOnly -ErrorAction SilentlyContinue) } catch { [Console]::Error.WriteLine('CopilotAtelier hook Add-FamiliarityContext.ps1 failed: ' + (Get-Variable -Name _ -ValueOnly)); exit 1 }\"", "windows": "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command \"try { Set-Variable -Name CopilotAtelierHook -Value (Get-Item -ErrorAction SilentlyContinue -LiteralPath ([IO.Path]::Combine('/', ([string][Environment]::GetEnvironmentVariable('PLUGIN_ROOT')).PadLeft(1, [char]42), 'com.github.copilot/hooks/scripts/Add-FamiliarityContext.ps1')), ([IO.Path]::Combine('/', ([string][Environment]::GetEnvironmentVariable('USERPROFILE')).PadLeft(1, [char]42), '.copilot/hooks/scripts/Add-FamiliarityContext.ps1')), ([IO.Path]::Combine('/', ([string][Environment]::GetEnvironmentVariable('HOME')).PadLeft(1, [char]42), '.copilot/hooks/scripts/Add-FamiliarityContext.ps1')), ([IO.Path]::Combine('/', ([string][Environment]::GetFolderPath('UserProfile')).PadLeft(1, [char]42), '.copilot/hooks/scripts/Add-FamiliarityContext.ps1')) | Select-Object -First 1 -ExpandProperty FullName); if (-not (Get-Variable -Name CopilotAtelierHook -ValueOnly)) { throw 'could not resolve the script under PLUGIN_ROOT, USERPROFILE, HOME or the user profile folder' }; & (Get-Variable -Name CopilotAtelierHook -ValueOnly); exit (Get-Variable -Name LASTEXITCODE -ValueOnly -ErrorAction SilentlyContinue) } catch { [Console]::Error.WriteLine('CopilotAtelier hook Add-FamiliarityContext.ps1 failed: ' + (Get-Variable -Name _ -ValueOnly)); exit 1 }\" ; exit (@(Get-Variable -Name LASTEXITCODE -ValueOnly -ErrorAction Ignore) + 1)[0]", "powershell": "pwsh -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command \"try { Set-Variable -Name CopilotAtelierHook -Value (Get-Item -ErrorAction SilentlyContinue -LiteralPath ([IO.Path]::Combine('/', ([string][Environment]::GetEnvironmentVariable('PLUGIN_ROOT')).PadLeft(1, [char]42), 'com.github.copilot/hooks/scripts/Add-FamiliarityContext.ps1')), ([IO.Path]::Combine('/', ([string][Environment]::GetEnvironmentVariable('USERPROFILE')).PadLeft(1, [char]42), '.copilot/hooks/scripts/Add-FamiliarityContext.ps1')), ([IO.Path]::Combine('/', ([string][Environment]::GetEnvironmentVariable('HOME')).PadLeft(1, [char]42), '.copilot/hooks/scripts/Add-FamiliarityContext.ps1')), ([IO.Path]::Combine('/', ([string][Environment]::GetFolderPath('UserProfile')).PadLeft(1, [char]42), '.copilot/hooks/scripts/Add-FamiliarityContext.ps1')) | Select-Object -First 1 -ExpandProperty FullName); if (-not (Get-Variable -Name CopilotAtelierHook -ValueOnly)) { throw 'could not resolve the script under PLUGIN_ROOT, USERPROFILE, HOME or the user profile folder' }; & (Get-Variable -Name CopilotAtelierHook -ValueOnly); exit (Get-Variable -Name LASTEXITCODE -ValueOnly -ErrorAction SilentlyContinue) } catch { [Console]::Error.WriteLine('CopilotAtelier hook Add-FamiliarityContext.ps1 failed: ' + (Get-Variable -Name _ -ValueOnly)); exit 1 }\" ; exit (@(Get-Variable -Name LASTEXITCODE -ValueOnly -ErrorAction Ignore) + 1)[0]" } ] } } |