Skip to content

Feature: Issue and PR templates management #7

@gjed

Description

@gjed

Summary

Manage .github/ISSUE_TEMPLATE/ and pull request templates as code through YAML configuration.

Problem

Issue and PR templates must be manually created and maintained in each repository:

  • Inconsistent templates across repositories
  • Missing templates in new repositories
  • No centralized template management

Proposed Solution

Add template configuration to repository definitions:

# In repositories.yml
repositories:
  my-repo:
    templates:
      issue_templates:
        - name: bug_report
          title: "Bug: "
          description: "Report a bug or unexpected behavior"
          labels: ["bug", "triage"]
          assignees: []
          body: |
            ## Description
            A clear description of the bug.
            
            ## Steps to Reproduce
            1. 
            2. 
            3. 
            
            ## Expected Behavior
            
            ## Actual Behavior
            
            ## Environment
            - OS:
            - Version:

        - name: feature_request
          title: "Feature: "
          description: "Suggest a new feature"
          labels: ["enhancement"]
          body: |
            ## Problem Statement
            
            ## Proposed Solution
            
            ## Alternatives Considered

      issue_config:
        blank_issues_enabled: false
        contact_links:
          - name: Documentation
            url: https://docs.example.com
            about: Check our docs first

      pull_request_template: |
        ## Description
        
        ## Type of Change
        - [ ] Bug fix
        - [ ] New feature
        - [ ] Breaking change
        - [ ] Documentation
        
        ## Checklist
        - [ ] Tests added/updated
        - [ ] Documentation updated
        - [ ] CHANGELOG updated

# Reusable in groups
groups:
  oss:
    templates:
      issue_templates:
        - name: bug_report
          # ... standard OSS bug template

Implementation

  1. Generate files in .github/ISSUE_TEMPLATE/ directory
  2. Generate .github/ISSUE_TEMPLATE/config.yml for issue config
  3. Generate .github/pull_request_template.md
  4. Use github_repository_file resource

Tasks

  • Design template schema
  • Implement issue template generation
  • Implement PR template generation
  • Implement issue config generation
  • Support template inheritance from groups
  • Add library of common templates
  • Update documentation

Considerations

  • YAML form-based templates vs markdown templates
  • Multiple PR templates support
  • Template validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions