feat: prompt agent to follow PR template when create new PR (#7698)

This commit is contained in:
Xingyao Wang 2025-04-03 16:02:24 -07:00 committed by GitHub
parent f74243542d
commit 8bf197df31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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 different
expect(pushBranchPrompt).not.toEqual(createPRPrompt);

View File

@ -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}.`,
};