Skip to content

feat(prompts): Add PR template discovery and integration to pull-request.prompt.md #140

@WilliamBerryiii

Description

@WilliamBerryiii

Summary

Enhance pull-request.prompt.md to automatically discover repository PR templates and merge generated content into the template structure.

Problem

The current PR generation prompt creates a standalone pr.md file that doesn't integrate with repository PR templates. Users must manually copy content into the template sections.

Proposed Solution

Implement Option B (Two-Phase Generation):

  1. Step 1.5: Discover PR template at GitHub-standard locations
  2. Step 3.5: Merge generated content into template sections with:
    • Auto-checked Type of Change boxes based on file patterns
    • Related Issues populated from commit/branch analysis
    • Security Considerations from security analysis

Acceptance Criteria

  • Template discovery works for .github/PULL_REQUEST_TEMPLATE.md
  • Fallback to standalone format when no template found
  • Change types auto-detected from file patterns
  • Issue references extracted from commits and branch names
  • Template structure preserved in output

Research

See .copilot-tracking/research/20251212-pull-request-template-integration-research.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions