Skip to content

ci(github-actions): add issue and PR templatesΒ #1078

@beatrizsmerino

Description

@beatrizsmerino

ci(github-actions): add issue and PR templates

⏱️ Estimate πŸ“Š Priority πŸ“ Size πŸ“… Start πŸ“… End
4h P2 M 05-02-2026 05-02-2026

πŸ“Έ Screenshots

Current Expected
N/A β€” This change has no visual impact. N/A β€” This change has no visual impact.

πŸ“ Summary

  • Add standardized GitHub issue and PR templates to enforce the project's standard format
  • Create 6 issue templates in YAML form format: bug, feature, refactor, build, ci, docs
  • Create 1 PR template in markdown format
  • Add config.yml to disable blank issues and provide a link to the README
  • Templates ensure consistency for external collaborators and reduce manual corrections

πŸ’‘ Why this change?

  • No templates exist β€” contributors must guess the format when opening issues or PRs
  • Issues and PRs follow a documented standard (Conventional Commits, metadata table, required sections)
  • Without templates, every issue/PR requires manual corrections to match the format
  • Templates enforce consistency regardless of who creates the issue or PR

βœ… Benefits

  • Guided YAML forms with required fields prevent incomplete or poorly formatted issues
  • Auto-assignment and auto-labeling eliminate repetitive manual setup on every new issue
  • Contributors follow the project standard without needing to read the format documentation first
  • PR template pre-fills all required sections, reducing review corrections

πŸ“‹ Steps

Phase 1: Create issue templates

  • Create 6 YAML form templates inside .github/ISSUE_TEMPLATE/
  • Create .github/ISSUE_TEMPLATE/feature.yml (reference implementation, baseline for all others):
name: ✨ Feature
description: New feature or task
title: "feat(scope): "
labels: []
assignees:
  - beatrizsmerino

body:
  - type: markdown
    attributes:
      value: |
        Thanks for creating this issue! Please fill out the information below.

        **Note:** Please write all content in English.

  - type: input
    id: title
    attributes:
      label: Title
      description: Brief title following conventional commits format
      placeholder: "feat(component): add new feature"
    validations:
      required: true

  - type: input
    id: time
    attributes:
      label: ⏱️ Estimated Time
      description: "Estimated time to complete (e.g., 1h, 2h, 4h, 1d)"
      placeholder: "2h"
    validations:
      required: true

  - type: dropdown
    id: priority
    attributes:
      label: πŸ“Š Priority
      options:
        - P0
        - P1
        - P2
        - P3
      default: 1
    validations:
      required: true

  - type: dropdown
    id: size
    attributes:
      label: πŸ“ Size
      options:
        - XS (<1h)
        - S (1-2h)
        - M (2-4h)
        - L (4-8h)
        - XL (>8h)
      default: 1
    validations:
      required: true

  - type: input
    id: start_date
    attributes:
      label: πŸ“… Start Date
      description: "DD-MM-YYYY"
      placeholder: "05-02-2026"

  - type: input
    id: end_date
    attributes:
      label: πŸ“… End Date
      description: "DD-MM-YYYY"
      placeholder: "05-02-2026"

  - type: textarea
    id: screenshots
    attributes:
      label: πŸ“Έ Screenshots
      value: |
        | Current | Expected |
        | :---: | :---: |
        | N/A β€” This change has no visual impact. | N/A β€” This change has no visual impact. |

  - type: textarea
    id: summary
    attributes:
      label: πŸ“ Summary
      description: Brief summary of what needs to be done (use bullet points)
      placeholder: |
        - Brief overview of the task
        - Key objectives
    validations:
      required: true

  - type: textarea
    id: why
    attributes:
      label: πŸ’‘ Why this change?
      description: Explain the motivation and reasoning
      placeholder: |
        - Why this feature is needed
        - What problem does it solve
    validations:
      required: true

  - type: textarea
    id: steps
    attributes:
      label: πŸ“‹ Steps
      description: Implementation steps (use phases and checkboxes)
      placeholder: |
        ### Phase 1: Setup
        - [ ] Step 1
        - [ ] Step 2

        ### Phase 2: Implementation
        - [ ] Step 3
        - [ ] Step 4
    validations:
      required: true

  - type: textarea
    id: tests
    attributes:
      label: πŸ§ͺ Tests
      description: How to verify this works correctly
      placeholder: |
        - [ ] Test scenario 1

  - type: textarea
    id: notes
    attributes:
      label: πŸ“Œ Notes
      description: Additional context (optional)

  - type: textarea
    id: references
    attributes:
      label: πŸ”— References
      placeholder: |
        ### Files to create
        - path/to/new-file.ts

        ### Files to modify
        - path/to/existing-file.ts

        ### Documentation
        - https://docs.example.com

        ### Related Issues
        - Related to: #NNN
  • Create .github/ISSUE_TEMPLATE/bug.yml with these differences from feature.yml:
    • name: πŸ› Bug Report
    • description: Report a bug or issue
    • title: "fix(scope): "
    • labels: [bug]
    • Title placeholder: fix(component): resolve layout issue
    • Replace πŸ’‘ Why this change? with πŸ’‘ Why this bug?
    • Add 3 fields BEFORE πŸ“‹ Steps:
      • ❌ Current Behavior (textarea, required)
      • βœ… Expected Behavior (textarea, required)
      • πŸ”„ Steps to Reproduce (textarea, required)
    • Add πŸ’» Environment field after πŸ“Œ Notes (OS, Browser, Node version)
  • Create .github/ISSUE_TEMPLATE/refactor.yml with these differences from feature.yml:
    • name: ♻️ Refactor
    • description: Refactor or improve code quality
    • title: "refactor(scope): "
    • labels: []
    • Title placeholder: refactor(component): improve code structure
  • Create .github/ISSUE_TEMPLATE/build.yml with these differences from feature.yml:
    • name: πŸ”§ Build / Dependencies
    • description: Build system or dependency changes
    • title: "build(scope): "
    • labels: [dependencies]
    • Title placeholder: build(deps): update npm packages
    • Add Build Type multi-select dropdown BEFORE πŸ“ Summary with options: Dependency update, Build configuration, Package scripts, Compiler/bundler settings, Other
  • Create .github/ISSUE_TEMPLATE/ci.yml with these differences from feature.yml:
    • name: πŸ”„ CI/CD
    • description: CI/CD or automation changes
    • title: "ci(scope): "
    • labels: [github_actions]
    • Title placeholder: ci(github-actions): update workflow configuration
    • Add CI/CD Type multi-select dropdown BEFORE πŸ“ Summary with options: GitHub Actions workflow, GitHub configuration, Automation scripts, Deployment pipeline, Testing automation, Other
  • Create .github/ISSUE_TEMPLATE/docs.yml with these differences from feature.yml:
    • name: πŸ“š Documentation
    • description: Documentation changes
    • title: "docs(scope): "
    • labels: [documentation]
    • Title placeholder: docs(readme): update installation instructions
    • Add Documentation Type multi-select dropdown BEFORE πŸ“ Summary with options: README, Code comments, API documentation, Tutorial/Guide, CHANGELOG, Other

Phase 2: Create config.yml

  • Create .github/ISSUE_TEMPLATE/config.yml to disable blank issues and add a README link:
blank_issues_enabled: false
contact_links:
  - name: README
    url: https://github.com/beatrizsmerino/{repo}/blob/master/README.md
    about: Check the project documentation for guides and information
  • Note: The {repo} placeholder must be replaced with the actual repository name.

Phase 3: Create PR template

  • Create .github/PULL_REQUEST_TEMPLATE/pull_request_template.md:
# type(scope): brief description

| ⏱️ Estimate | πŸ“Š Priority | πŸ“ Size | πŸ“… Start | πŸ“… End |
| --- | --- | --- | --- | --- |
| Xh | PX | X | DD-MM-YYYY | DD-MM-YYYY |

## πŸ“Έ Screenshots
| Current | Expected |
| :---: | :---: |
| N/A β€” This change has no visual impact. | N/A β€” This change has no visual impact. |

## πŸ”„ Type of Change
- [ ] Bug fix
- [ ] Breaking change
- [ ] Dependency
- [ ] New feature
- [ ] Improvement
- [ ] Configuration
- [ ] Documentation
- [ ] CI/CD

## πŸ“ Summary

## πŸ“‹ Changes Made

## πŸ§ͺ Tests
- [ ] Run tests and verify they pass
- [ ] Perform manual verification

## πŸ“Œ Notes

## πŸ”— References

### Related Issues
- Closes #

### Related PRs

πŸ§ͺ Tests

  • Open "New Issue" and verify all 6 templates appear
  • Verify blank issues are disabled (no "Open a blank issue" option)
  • Create a test issue with each template and verify fields render correctly
  • Open "New Pull Request" and verify the PR template auto-fills
  • Verify labels are auto-assigned when selecting a template with labels
  • Verify beatrizsmerino is auto-assigned
  • Verify the config.yml README link points to the correct repo URL
  • Verify functionality works as expected

πŸ“Œ Notes

Template overview

All templates share a common structure with these fields:

File Name Description Labels Title Prefix Unique Fields
bug.yml πŸ› Bug Report Report a bug or issue bug fix(scope): Current Behavior, Expected Behavior, Steps to Reproduce, Environment
feature.yml ✨ Feature New feature or task (none) feat(scope): (common fields only)
refactor.yml ♻️ Refactor Refactor or improve code quality (none) refactor(scope): (common fields only)
build.yml πŸ”§ Build / Dependencies Build system or dependency changes dependencies build(scope): Build Type dropdown
ci.yml πŸ”„ CI/CD CI/CD or automation changes github_actions ci(scope): CI/CD Type dropdown
docs.yml πŸ“š Documentation Documentation changes documentation docs(scope): Documentation Type dropdown

Common YAML structure

All templates share this field order:

# Common fields (all templates)
assignees:
  - beatrizsmerino

body:
  # 1. Markdown header (instructions + "write in English" note)
  # 2. Title input (conventional commits)
  # 3. ⏱️ Estimated Time input
  # 4. πŸ“Š Priority dropdown (P0 Critical, P1 High, P2 Medium, P3 Low)
  # 5. πŸ“ Size dropdown (XS <1h, S 1-2h, M 2-4h, L 4-8h, XL >8h)
  # 6. πŸ“… Start Date input (DD-MM-YYYY)
  # 7. πŸ“… End Date input (DD-MM-YYYY)
  # 8. πŸ“Έ Screenshots textarea (pre-filled with Current|Expected table)
  # 9. πŸ“ Summary textarea (required)
  # 10. πŸ’‘ Why this change? / Why this bug? textarea (required)
  # 11. πŸ“‹ Steps textarea (required, phases + checkboxes)
  # 12. πŸ§ͺ Tests textarea
  # 13. πŸ“Œ Notes textarea (optional)
  # 14. πŸ”— References textarea (ordered subsections)

πŸ”— References

Files to create

  • .github/ISSUE_TEMPLATE/bug.yml
  • .github/ISSUE_TEMPLATE/build.yml
  • .github/ISSUE_TEMPLATE/ci.yml
  • .github/ISSUE_TEMPLATE/docs.yml
  • .github/ISSUE_TEMPLATE/feature.yml
  • .github/ISSUE_TEMPLATE/refactor.yml
  • .github/ISSUE_TEMPLATE/config.yml
  • .github/PULL_REQUEST_TEMPLATE/pull_request_template.md

Documentation

Metadata

Metadata

Labels

configurationProject setup and configuration filesgithub_actionsGitHub .github/ folder configuration

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions