File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Config Files
22
3+ ## Git Hooks
4+
5+ Strips AI-generated trailers (e.g. ` Co-authored-by: Copilot ` ) from commit messages automatically.
6+
7+ ** macOS / Linux:**
8+
9+ ``` bash
10+ bash git-hooks/install.sh
11+ ```
12+
13+ ** Windows (PowerShell):**
14+
15+ ``` powershell
16+ powershell -ExecutionPolicy Bypass -File git-hooks/install.ps1
17+ ```
18+
319## Winget Config instructions
420
5211 . Take the desired configuration scripts from the [ winget_configurations folder] ( ./winget_configurations )
Original file line number Diff line number Diff line change @@ -112,6 +112,13 @@ Describe 'Remove-AITrailers' {
112112 $result = Remove-AITrailers - Lines $lines
113113 $result | Should -Not -Match ' co-authored-by'
114114 }
115+
116+ It ' removes Co-authored-by: Copilot with GitHub noreply bot email' {
117+ $lines = @ (' Fix bug' , ' ' , ' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>' )
118+ $result = @ (Remove-AITrailers - Lines $lines )
119+ $result | Should -Not -Match ' Co-authored-by'
120+ $result [0 ] | Should - Be ' Fix bug'
121+ }
115122 }
116123
117124 Context ' Claude / Anthropic Co-authored-by is removed' {
@@ -384,6 +391,13 @@ Describe 'commit-msg bash hook (end-to-end)' -Skip:($IsWindows -or -not (Get-Com
384391 $result.Trim () | Should - Be ' Fix bug'
385392 }
386393
394+ It ' removes Copilot trailer with GitHub noreply bot email' {
395+ $content = " Fix bug`n`n Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>`n "
396+ $result = Invoke-BashHook $content
397+ $result | Should -Not -Match ' Co-authored-by'
398+ $result.Trim () | Should - Be ' Fix bug'
399+ }
400+
387401 It ' removes Claude trailer by email domain' {
388402 $content = " Fix bug`n`n Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>`n "
389403 $result = Invoke-BashHook $content
You can’t perform that action at this time.
0 commit comments