mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
feat: custom branch name templates (#571)
* Add branch-name-template config option * Logging * Use branch name template * Add label to template variables * Add description template variable * More concise description for branch_name_template * Remove more granular time template variables * Only fetch first label * Add check for empty template-generated name * Clean up comments, docstrings * Merge createBranchTemplateVariables into generateBranchName * Still replace undefined values * Fall back to default on duplicate branch * Parameterize description wordcount * Remove some over-explanatory comments * NUM_DESCRIPTION_WORDS: 3 -> 5
This commit is contained in:
@@ -61,6 +61,7 @@ describe("generatePrompt", () => {
|
||||
body: "This is a test PR",
|
||||
author: { login: "testuser" },
|
||||
state: "OPEN",
|
||||
labels: { nodes: [] },
|
||||
createdAt: "2023-01-01T00:00:00Z",
|
||||
additions: 15,
|
||||
deletions: 5,
|
||||
@@ -475,6 +476,7 @@ describe("generatePrompt", () => {
|
||||
body: "The login form is not working",
|
||||
author: { login: "testuser" },
|
||||
state: "OPEN",
|
||||
labels: { nodes: [] },
|
||||
createdAt: "2023-01-01T00:00:00Z",
|
||||
comments: {
|
||||
nodes: [],
|
||||
|
||||
Reference in New Issue
Block a user