-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Support generating PR descriptions based on a template #1431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for generating pull request descriptions based on a provided template. It allows users to specify a template that the AI will follow when generating PR descriptions, ensuring consistency with project standards and requirements.
Key Changes
- Added template parameter to the prompt system for PR description generation
- Modified parsing logic to handle template-based descriptions differently
- Enhanced user prompt to include template instructions when provided
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/extension/prompts/node/github/pullRequestDescriptionPrompt.tsx | Adds template parameter to prompt interfaces and includes template instructions in the system rules and user message |
| src/extension/prompt/node/githubPullRequestTitleAndDescriptionGenerator.ts | Updates generator to accept and process template parameter, modifies parsing logic to handle template-based responses |
src/extension/prompt/node/githubPullRequestTitleAndDescriptionGenerator.ts
Show resolved
Hide resolved
src/extension/prompt/node/githubPullRequestTitleAndDescriptionGenerator.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't forgotten about this PR, I just see that the stests are failing and I'm trying to understand why.
src/extension/prompt/node/githubPullRequestTitleAndDescriptionGenerator.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the prompt changed, you'll also need to run npm run simulate. See https://github.com/microsoft/vscode-copilot-chat/blob/6fa866f39d84179d004edab249b9b1c57260cb89/CONTRIBUTING.md.
Closes microsoft/vscode-pull-request-github#5683 along with microsoft/vscode-pull-request-github#8025