Templates provide structure and consistency for issues and pull requests. They guide contributors to include necessary information, making it easier to triage, review, and resolve contributions efficiently.
Templates are stored in .github/ and automatically appear when users create issues or pull requests.
The bug report template (bug_report.yml) provides a structured form for reporting bugs:
name: Bug reportdescription: Report a buglabels: [bug]body: - type: textarea id: description attributes: label: Description description: What happened and what you expected validations: required: true
What it includes:
Name: “Bug report” (appears in issue template selector)
Description: Brief explanation of the template’s purpose
Labels: Automatically applies the bug label
Form Fields:
Description (required): Free-form text area for bug details
How users see it:When creating a new issue, users select “Bug report” and see a form with a description field. The form requires them to explain:
**What happened:**When I run `pytest`, I get a ModuleNotFoundError for 'src.utils'.**Expected behavior:**Tests should run successfully.**Steps to reproduce:**1. Clone the repository2. Run `pip install -e ".[dev]"`3. Run `pytest`**Environment:**- Python 3.12- Ubuntu 22.04- pytest 8.0.0
4
Submit
Click “Submit new issue” - the bug label is applied automatically
name: Bug reportdescription: Report a buglabels: [bug]body: - type: textarea id: description attributes: label: Description description: What happened and what you expected validations: required: true - type: textarea id: reproduce attributes: label: Steps to Reproduce description: Clear steps to reproduce the issue placeholder: | 1. Go to '...' 2. Click on '...' 3. See error validations: required: true - type: dropdown id: severity attributes: label: Severity description: How severe is this bug? options: - Critical (system down) - High (major functionality broken) - Medium (functionality impaired) - Low (minor issue) validations: required: true - type: input id: version attributes: label: Version description: What version are you running? placeholder: v1.2.3 validations: required: true - type: textarea id: logs attributes: label: Relevant Logs description: Paste any relevant logs or error messages render: shell - type: checkboxes id: checks attributes: label: Pre-submission Checklist options: - label: I have searched for similar issues required: true - label: I am using the latest version required: true
## Description<!-- Provide a clear and concise description of your changes -->### Type of Change<!-- Mark the relevant option with an 'x' -->- [ ] Bug fix (non-breaking change fixing an issue)- [ ] New feature (non-breaking change adding functionality)- [ ] Breaking change (fix or feature causing existing functionality to break)- [ ] Documentation update- [ ] Refactoring (no functional changes)## Changes Made<!-- List the specific changes in bullet points -->---## Related Issues<!-- Link related issues (e.g., "Fixes #123", "Relates to #456") -->Closes ### Testing<!-- Describe how you tested your changes -->### Test Coverage- [ ] Unit tests added/updated- [ ] Integration tests added/updated- [ ] Manual testing completed### Test Results
name: Feature requestdescription: Suggest a new feature or enhancementlabels: [enhancement]body: - type: textarea id: problem attributes: label: Problem Statement description: What problem does this feature solve? placeholder: I'm frustrated when... validations: required: true - type: textarea id: solution attributes: label: Proposed Solution description: How would you like this to work? placeholder: I would like to... validations: required: true - type: textarea id: alternatives attributes: label: Alternatives Considered description: What alternative solutions have you considered? - type: textarea id: additional attributes: label: Additional Context description: Any other context, screenshots, or examples
name: Questiondescription: Ask a question about the projectlabels: [question]body: - type: markdown attributes: value: | Thanks for your interest! Before asking: - Check existing issues and discussions - Review the documentation - Search Stack Overflow - type: textarea id: question attributes: label: Question description: What would you like to know? validations: required: true - type: textarea id: context attributes: label: Context description: What are you trying to accomplish? - type: textarea id: tried attributes: label: What I've Tried description: What have you already attempted?