Add linked issue guidance and ELI5 sections to PR generation prompts (#12613)
* Add linked issue guidance and ELI5 sections to PR generation prompts Include linked GitHub issues in PR descriptions with Fixes/Refs guidance, and require ELI5 Problem and Solution sections before implementation details. Tests verify linked issue substitution and prompt structure enforcement. * Include linked issue details in PR description generation - Fetch the linked GitHub/GitLab issue title and body so generated PRs reference real issue context instead of just a number - Use provider-specific reference syntax (Fixes/Refs, Closes/Related to, AB#) and label the issue by the active provider - Feed issue title and description into the generation prompt while treating them as untrusted context, never as instructions - Fall back to a cached work-item title when the provider lookup fails, and skip cross-provider issue attachment
This commit is contained in:
@@ -133,13 +133,15 @@ export function mapIssueInfo(data: {
|
||||
url?: string
|
||||
html_url?: string
|
||||
labels?: { name: string }[]
|
||||
body?: string | null
|
||||
}): IssueInfo {
|
||||
return {
|
||||
number: data.number,
|
||||
title: data.title,
|
||||
state: data.state?.toLowerCase() === 'open' ? 'open' : 'closed',
|
||||
url: data.html_url ?? data.url ?? '',
|
||||
labels: (data.labels || []).map((l) => l.name)
|
||||
labels: (data.labels || []).map((l) => l.name),
|
||||
...(typeof data.body === 'string' ? { description: data.body } : {})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user