claude-teammate 0.1.263 → 0.1.265
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/src/claude.js +14 -25
- package/src/worker/github-issue-workflow.js +1 -1
package/package.json
CHANGED
package/src/claude.js
CHANGED
|
@@ -821,37 +821,26 @@ export async function runClaudeRepoExtraction(input) {
|
|
|
821
821
|
);
|
|
822
822
|
}
|
|
823
823
|
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
slug
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
additionalProperties: false
|
|
831
|
-
};
|
|
832
|
-
|
|
833
|
-
export async function runClaudeBranchSlug(title) {
|
|
824
|
+
export async function runClaudeBranchSlug(title, cwd) {
|
|
825
|
+
const prompt =
|
|
826
|
+
`Generate a short English branch name slug (3-5 lowercase words joined by hyphens) that summarizes this issue title. ` +
|
|
827
|
+
`Output ONLY the slug, nothing else. No punctuation. No explanation. ` +
|
|
828
|
+
`Examples: add-user-auth, fix-login-redirect, manage-maker-requests. ` +
|
|
829
|
+
`Issue title: ${title}`;
|
|
834
830
|
try {
|
|
835
|
-
const
|
|
836
|
-
|
|
837
|
-
"
|
|
838
|
-
|
|
839
|
-
{
|
|
840
|
-
model: "haiku",
|
|
841
|
-
permissionMode: "bypassPermissions",
|
|
842
|
-
effort: "low",
|
|
843
|
-
runOpts: {
|
|
844
|
-
timeout: 15_000,
|
|
845
|
-
phase: "branch-slug"
|
|
846
|
-
}
|
|
847
|
-
}
|
|
831
|
+
const { stdout } = await runClaudeCommand(
|
|
832
|
+
"claude",
|
|
833
|
+
["--print", "--model", "haiku", "--permission-mode", "bypassPermissions", "--output-format", "text", prompt],
|
|
834
|
+
{ cwd, timeout: 30_000 }
|
|
848
835
|
);
|
|
849
|
-
return String(
|
|
836
|
+
return String(stdout || "")
|
|
837
|
+
.trim()
|
|
850
838
|
.toLowerCase()
|
|
851
839
|
.replace(/[^a-z0-9-]/gu, "")
|
|
852
840
|
.replace(/^-+|-+$/gu, "")
|
|
853
841
|
.slice(0, 40);
|
|
854
|
-
} catch {
|
|
842
|
+
} catch (error) {
|
|
843
|
+
console.error("[branch-slug] Claude CLI failed:", error?.message || error);
|
|
855
844
|
return "";
|
|
856
845
|
}
|
|
857
846
|
}
|
|
@@ -207,7 +207,7 @@ export async function processGitHubIssue({
|
|
|
207
207
|
const approvalComment = isApprovalComment(latestComment.body);
|
|
208
208
|
|
|
209
209
|
if (approvalComment) {
|
|
210
|
-
const englishSlug = githubIssueMemory.branch_name ? "" : await runClaudeBranchSlug(detail.title);
|
|
210
|
+
const englishSlug = githubIssueMemory.branch_name ? "" : await runClaudeBranchSlug(detail.title, projectRoot);
|
|
211
211
|
const nextBranchName =
|
|
212
212
|
githubIssueMemory.branch_name || buildImplementationBranchName(detail.title, detail.number, englishSlug);
|
|
213
213
|
const existingPr = await github.findPullRequestByHead(githubIssueMemory.repo_url, nextBranchName);
|