name: Bug Report
description: Report a bug or unexpected behavior
labels: ["bug"]
type: "Task"
body:
    - type: markdown
      attributes:
          value: |
              Thanks for taking the time to report this bug!

    - type: textarea
      id: description
      attributes:
          label: Description
          description: Describe the bug using the "In order to" format
          placeholder: |
              In order to [achieve some goal/benefit],
              as a [type of user],
              I need [the bug to be fixed/expected behavior].
      validations:
          required: true

    - type: textarea
      id: current-behavior
      attributes:
          label: Current Behavior
          description: Describe what currently happens using Given/When/Then format
          placeholder: |
              ```gherkin
              Scenario: Bug occurs
                Given [initial context/state]
                When [action is taken]
                Then [unexpected outcome/bug behavior]
              ```
      validations:
          required: true

    - type: textarea
      id: expected-behavior
      attributes:
          label: Expected Behavior
          description: Describe what should happen using Given/When/Then format
          placeholder: |
              ```gherkin
              Scenario: Expected behavior
                Given [initial context/state]
                When [action is taken]
                Then [expected outcome]
              ```
      validations:
          required: true

    - type: textarea
      id: steps-to-reproduce
      attributes:
          label: Steps to Reproduce
          description: Provide steps to reproduce the bug
          placeholder: |
              1. Go to '...'
              2. Run command '...'
              3. See error
      validations:
          required: true

    - type: textarea
      id: environment
      attributes:
          label: Environment
          description: Provide relevant environment details
          placeholder: |
              - OS: [e.g., Ubuntu 24.04, macOS 14.0]
              - Version: [e.g., v0.5.0]
              - Rust version: [e.g., 1.75.0]
      validations:
          required: false

    - type: textarea
      id: additional-context
      attributes:
          label: Additional Context
          description: Any additional information, logs, or screenshots
          placeholder: Add any other context, error logs, or screenshots here.
      validations:
          required: false
