Skip to content

Commit 492a8ac

Browse files
committed
fix(agents): address second-round Copilot PR review suggestions (#1697)
- Fix install-git-hooks.sh: use git rev-parse --git-path hooks for HOOKS_DST to support git worktrees; add mkdir -p to ensure dir exists - Fix project-words.txt: restore alphabetical order for penalise (after peerlist), repomix (in re* section before repr), specialised (between socketaddr and sqllite), and toplevel (between tlsv and Torrentstorm); remove duplicates from near-end of file - Fix copilot-setup-steps.yml: expand push/pull_request path triggers to include scripts/install-git-hooks.sh and scripts/pre-commit.sh
1 parent a71ac07 commit 492a8ac

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/copilot-setup-steps.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ on:
77
push:
88
paths:
99
- .github/workflows/copilot-setup-steps.yml
10+
- scripts/install-git-hooks.sh
11+
- scripts/pre-commit.sh
1012
pull_request:
1113
paths:
1214
- .github/workflows/copilot-setup-steps.yml
15+
- scripts/install-git-hooks.sh
16+
- scripts/pre-commit.sh
1317

1418
jobs:
1519
# The job MUST be called `copilot-setup-steps` or it will not be picked up

project-words.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ obra
127127
oneshot
128128
ostr
129129
Pando
130-
penalise
131130
peekable
132131
peerlist
132+
penalise
133133
programatik
134134
proot
135135
proto
@@ -140,6 +140,7 @@ Rasterbar
140140
realpath
141141
reannounce
142142
Registar
143+
repomix
143144
repr
144145
reqs
145146
reqwest
@@ -149,7 +150,6 @@ ringsize
149150
rngs
150151
rosegment
151152
routable
152-
repomix
153153
rstest
154154
rusqlite
155155
rustc
@@ -166,6 +166,7 @@ SHLVL
166166
skiplist
167167
slowloris
168168
socketaddr
169+
specialised
169170
sqllite
170171
subsec
171172
Swatinem
@@ -178,6 +179,7 @@ testcontainers
178179
Tera
179180
thiserror
180181
tlsv
182+
toplevel
181183
Torrentstorm
182184
torrust
183185
torrustracker
@@ -246,8 +248,6 @@ sysmalloc
246248
sysret
247249
timespec
248250
toki
249-
specialised
250-
toplevel
251251
torru
252252
ttwu
253253
uninit

scripts/install-git-hooks.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ set -euo pipefail
1111

1212
REPO_ROOT="$(git rev-parse --show-toplevel)"
1313
HOOKS_SRC="${REPO_ROOT}/.githooks"
14-
HOOKS_DST="${REPO_ROOT}/.git/hooks"
14+
HOOKS_DST="$(git rev-parse --git-path hooks)"
15+
mkdir -p "${HOOKS_DST}"
1516

1617
if [ ! -d "${HOOKS_SRC}" ]; then
1718
echo "ERROR: .githooks/ directory not found at ${HOOKS_SRC}"

0 commit comments

Comments
 (0)