devscribe-reason 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/setup.js +16 -1
package/package.json
CHANGED
package/scripts/setup.js
CHANGED
|
@@ -8,7 +8,7 @@ import { globSync } from "glob";
|
|
|
8
8
|
|
|
9
9
|
const token = process.env.GITHUB_TOKEN || "";
|
|
10
10
|
let repo = process.env.GITHUB_REPO || "";
|
|
11
|
-
|
|
11
|
+
let branch = process.env.GITHUB_BRANCH || "";
|
|
12
12
|
|
|
13
13
|
// Auto-detect GitHub repo from git remote if not provided
|
|
14
14
|
if (!repo) {
|
|
@@ -30,6 +30,21 @@ if (!repo) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
// Auto-detect current branch from git if not provided
|
|
34
|
+
if (!branch) {
|
|
35
|
+
try {
|
|
36
|
+
branch = execSync("git rev-parse --abbrev-ref HEAD", {
|
|
37
|
+
stdio: "pipe",
|
|
38
|
+
timeout: 1000,
|
|
39
|
+
})
|
|
40
|
+
.toString()
|
|
41
|
+
.trim();
|
|
42
|
+
} catch {
|
|
43
|
+
// git command failed, default to main
|
|
44
|
+
branch = "main";
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
33
48
|
// Try to find the claude binary in common locations
|
|
34
49
|
function findClaudeBinary() {
|
|
35
50
|
// 1. Try 'which claude' if claude is in PATH
|