Skip to main content

Command Palette

Search for a command to run...

GitHub Templates

GitHub Templates and its types

Published
•1 min read•View as Markdown
GitHub Templates

GitHub Templates are predefined files that help standardize workflows and improve collaboration in repositories. They are commonly used for issues, pull requests, contributing guidelines, and more. Here’s a quick guide:


✅ Types of GitHub Templates

  1. Issue Templates

    • Located in .github/ISSUE_TEMPLATE/

    • Helps users provide structured information when creating issues.

    • Example: YAMLname: Bug Reportdescription: Report a bugtitle: "[BUG] <title>"labels: [bug]body: - type: textarea attributes: label: Description description: Describe the bugShow more lines

  2. Pull Request Templates

    • File: .github/PULL_REQUEST_TEMPLATE.md

    • Ensures contributors follow a checklist when submitting PRs.

    • Example: Markdown## DescriptionPlease include a summary of the changes.## Checklist- [ ] Tests added- [ ] Documentation updatedShow more lines

  3. CONTRIBUTING.md

    • Guidelines for contributing to the project.

    • Example: Markdown# Contributing Guidelines- Fork the repo- Create a feature branch- Submit a PRShow more lines

  4. CODEOWNERS

    • File: .github/CODEOWNERS

    • Defines who reviews changes in specific files or directories.

    • Example:

        * @team-leads
        docs/* @docs-team
      
  5. Workflow Templates (GitHub Actions)

    • Located in .github/workflows/

    • Automates CI/CD pipelines.

    • Example: YAMLname: CIon: [push, pull_request]jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - run: npm install && npm testShow more lines


✅ Benefits

  • Consistency across issues and PRs.

  • Easier onboarding for contributors.

  • Automates repetitive tasks.