Add auto-start SSH tunnel hook
All checks were successful
CI / validate (pull_request) Successful in 46s
All checks were successful
CI / validate (pull_request) Successful in 46s
Starts the Forgejo tunnel (localhost:3000) automatically on prompt submit if it's not already running. Prevents needing to manually restart after window reloads. Co-authored-by: Samuel James <ssamjame@amazon.com> Co-authored-by: Kiro <noreply@kiro.dev>
This commit is contained in:
parent
d1697fc811
commit
2f5da66864
1 changed files with 14 additions and 0 deletions
14
.kiro/hooks/start-forgejo-tunnel.kiro.hook
Normal file
14
.kiro/hooks/start-forgejo-tunnel.kiro.hook
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"enabled": true,
|
||||
"name": "Start Forgejo Tunnel",
|
||||
"description": "Starts the SSH tunnel to Forgejo (localhost:3000 → 192.168.122.102:3000) when a prompt is submitted, ensuring the Forgejo extension and Git operations work.",
|
||||
"version": "1",
|
||||
"when": {
|
||||
"type": "promptSubmit"
|
||||
},
|
||||
"then": {
|
||||
"type": "runCommand",
|
||||
"command": "powershell -Command \"if (-not (Test-NetConnection -ComputerName localhost -Port 3000 -InformationLevel Quiet -WarningAction SilentlyContinue)) { Start-Process ssh -ArgumentList '-N','forgejo-tunnel' -WindowStyle Hidden }\"",
|
||||
"timeout": 10
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue