github / github/copilot-cli

sessionStart hook in .github/hooks/ does not fire in Copilot CLI (v0.0.420)

Aperta
#1,730 8 commenti 3 reazioni 0 assegnatari Vedi su GitHub
area:plugins
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

### Describe the bug

`sessionStart` hooks defined in `.github/hooks/*.json` do not execute when starting a Copilot CLI session.

### Environment
- **CLI version:** v0.0.420
- **OS:** Windows 11
- **Shell:** PowerShell 7

### Hook configuration

**File:** `.github/hooks/test-hook.json`
```json
{
"version": 1,
"hooks": {
"sessionStart": [
{
"type": "command",
"bash": "echo \"Session started: $(date)\" >> logs/session.log",
"powershell": "Add-Content -Path logs/session.log -Value \"Session started: $(Get-Date)\"",
"cwd": ".",
"timeoutSec": 10
}
]
}
}
```

### Expected behavior

`logs/session.log` should be created with a timestamp entry when a CLI session starts.

### Actual behavior

`logs/session.log` is never created. The `sessionStart` hook does not fire.

### Additional context

```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.