Skip to content

Commit 8bf197d

Browse files
authored
feat: prompt agent to follow PR template when create new PR (#7698)
1 parent f742435 commit 8bf197d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

frontend/__tests__/components/chat/action-suggestions.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ describe("ActionSuggestions", () => {
9898
const pushBranchPrompt =
9999
"Please push the changes to a remote branch on GitHub, but do NOT create a pull request. Please use the exact SAME branch name as the one you are currently on.";
100100
const createPRPrompt =
101-
"Please push the changes to GitHub and open a pull request. Please create a meaningful branch name that describes the changes.";
101+
"Please push the changes to GitHub and open a pull request. Please create a meaningful branch name that describes the changes. If a pull request template exists in the repository, please follow it when creating the PR description.";
102102

103103
// Verify the prompts are different
104104
expect(pushBranchPrompt).not.toEqual(createPRPrompt);

frontend/src/components/features/chat/action-suggestions.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function ActionSuggestions({
3838
}, but do NOT create a ${pr}. Please use the exact SAME branch name as the one you are currently on.`,
3939
createPR: `Please push the changes to ${
4040
isGitLab ? "GitLab" : "GitHub"
41-
} and open a ${pr}. Please create a meaningful branch name that describes the changes.`,
41+
} and open a ${pr}. Please create a meaningful branch name that describes the changes. If a ${pr} template exists in the repository, please follow it when creating the ${prShort} description.`,
4242
pushToPR: `Please push the latest changes to the existing ${pr}.`,
4343
};
4444

0 commit comments

Comments
 (0)