3 files changed,
+10,
-10
M
Makefile
+2,
-2
1@@ -14,8 +14,8 @@ build: clean
2 .PHONY: build
3
4 clean:
5- @# Remove result symlink (not the target in /nix/store)
6- @rm -f result
7+ @# Remove result directory/symlink
8+ @rm -rf result
9 @rm -rf bin/
10 .PHONY: clean
11
M
hooks.go
+1,
-1
1@@ -46,7 +46,7 @@ func InstallHook(repoPath string) error {
2 }
3
4 fmt.Printf("Installed post-commit hook to %s\n", postCommitHook)
5- fmt.Println("Commits with issue references (e.g., 'fixes #872a52d') will now automatically close git-bug issues")
6+ fmt.Println("Commits with issue references (e.g., 'fixes #872a52d') will now automatically close issues")
7 return nil
8 }
9
+7,
-7
1@@ -1,14 +1,14 @@
2 #!/bin/bash
3 # pgit post-commit hook
4-# Automatically closes git-bug issues referenced in commit messages
5+# Automatically closes issues referenced in commit messages using the bug CLI
6 #
7 # Usage: Install as .git/hooks/post-commit
8
9 set -e
10
11-# Check if git-bug is available
12-if ! command -v git-bug &> /dev/null; then
13- echo "Warning: git-bug not found in PATH, skipping issue updates" >&2
14+# Check if bug is available
15+if ! command -v bug &> /dev/null; then
16+ echo "Warning: bug not found in PATH, skipping issue updates" >&2
17 exit 0
18 fi
19
20@@ -41,20 +41,20 @@ echo "$ISSUE_REFS" | while read -r ref; do
21 continue
22 fi
23
24- echo "Processing git-bug issue #$issue_id..." >&2
25+ echo "Processing issue #$issue_id..." >&2
26
27 # Add comment with commit reference
28 comment="Fixed in commit $COMMIT_HASH"
29
30 # Try to add comment - don't fail the commit if this fails
31- if git-bug bug comment new "$issue_id" -m "$comment" 2>/dev/null; then
32+ if bug agent comment "$issue_id" --message "$comment" 2>/dev/null; then
33 echo " Added comment to issue #$issue_id" >&2
34 else
35 echo " Warning: Failed to add comment to issue #$issue_id" >&2
36 fi
37
38 # Try to close the issue - don't fail the commit if this fails
39- if git-bug bug status close "$issue_id" 2>/dev/null; then
40+ if bug agent close "$issue_id" 2>/dev/null; then
41 echo " Closed issue #$issue_id" >&2
42 else
43 echo " Warning: Failed to close issue #$issue_id" >&2