π OpenHands: AI-Driven Development
feat: prompt agent to follow PR template when create new PR (#7698)
Xingyao Wang8bf197df313e
diff --git a/frontend/__tests__/components/chat/action-suggestions.test.tsx b/frontend/__tests__/components/chat/action-suggestions.test.tsxindex 0da96e2e62..455588b56a 100644--- a/frontend/__tests__/components/chat/action-suggestions.test.tsx+++ b/frontend/__tests__/components/chat/action-suggestions.test.tsx@@ -98,7 +98,7 @@ describe("ActionSuggestions", () => {const pushBranchPrompt ="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.";const createPRPrompt =- "Please push the changes to GitHub and open a pull request. Please create a meaningful branch name that describes the changes.";+ "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.";// Verify the prompts are differentexpect(pushBranchPrompt).not.toEqual(createPRPrompt);diff --git a/frontend/src/components/features/chat/action-suggestions.tsx b/frontend/src/components/features/chat/action-suggestions.tsxindex bda193c9e5..ef8d4d7817 100644--- a/frontend/src/components/features/chat/action-suggestions.tsx+++ b/frontend/src/components/features/chat/action-suggestions.tsx@@ -38,7 +38,7 @@ export function ActionSuggestions({}, but do NOT create a ${pr}. Please use the exact SAME branch name as the one you are currently on.`,createPR: `Please push the changes to ${isGitLab ? "GitLab" : "GitHub"- } and open a ${pr}. Please create a meaningful branch name that describes the changes.`,+ } 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.`,pushToPR: `Please push the latest changes to the existing ${pr}.`,};