# Project Mu GitHub Bug Report Template
#
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there
#       instead of the file in this repo.
#
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
#

name: 🐛 Bug Report
description: File a bug report
title: "[Bug]: <title>"
labels: ["type:bug", "state:needs-triage"]

body:
  - type: markdown
    attributes:
      value: |
        👋 Thanks for taking the time to fill out this bug report!

  - type: checkboxes
    attributes:
      label: Is there an existing issue for this?
      description: Please search to see if an issue already exists for the bug you encountered.
      options:
      - label: I have searched existing issues
        required: true

  - type: textarea
    id: current_behavior
    attributes:
      label: Current Behavior
      description: A concise description of the bug that you're experiencing.
    validations:
      required: true

  - type: textarea
    id: expected_behavior
    attributes:
      label: Expected Behavior
      description: A concise description of what you expected to happen.
    validations:
      required: true

  - type: textarea
    id: steps_to_reproduce
    attributes:
      label: Steps To Reproduce
      description: Steps to reproduce the behavior.
      placeholder: |
        <example>
        1. In this environment...
        2. With this config...
        3. Boot to '...'
        4. Change option '...'
        4. See error...
    validations:
      required: true

  - type: textarea
    id: build_environment
    attributes:
      label: Build Environment
      description: |
        examples:
          - **OS**: Ubuntu 20.04 or Windows 11...
          - **Tool Chain**: GCC5 or VS2022 or CLANGPDB...
          - **Targets Impacted**: RELEASE, DEBUG, NO-TARGET, NOOPT...
      value: |
          - OS(s):
          - Tool Chain(s):
          - Targets Impacted:
      render: markdown
    validations:
      required: true

  - type: textarea
    id: version_info
    attributes:
      label: Version Information
      description: What version of this repo reproduces the problem?
      placeholder: |
        Commit: <SHA>
        -or-
        Tag: <Tag>
      render: text
    validations:
      required: true

  - type: markdown
    attributes:
      value: |
        **Urgency Key**
        - 🟢 **Low**
          - A minor change with little to no important functional impact
          - It is not important to fix this in a specific time frame
        - 🟡 **Medium**
          - An important change with a functional impact
          - Will be prioritized above *low* issues in the normal course of development
        - 🔥 **High**
          - A critical change that has a significant functional impact
          - Must be fixed immediately

  - type: dropdown
    id: urgency
    attributes:
      label: Urgency
      description: How urgent is it to fix this bug?
      multiple: false
      options:
        - Low
        - Medium
        - High
    validations:
      required: true

  - type: dropdown
    id: fix_owner
    attributes:
      label: Are you going to fix this?
      description: Indicate if you are going to fix this or requesting someone else fix it.
      multiple: false
      options:
        - I will fix it
        - Someone else needs to fix it
    validations:
      required: true

  - type: dropdown
    id: needs_maintainer_feedback
    attributes:
      label: Do you need maintainer feedback?
      description: Indicate if you would like a maintainer to provide feedback on this submission.
      multiple: false
      options:
        - No maintainer feedback needed
        - Maintainer feedback requested
    validations:
      required: true

  - type: textarea
    id: anything_else
    attributes:
      label: Anything else?
      description: |
        Links? References? Anything that will give us more context about the issue you are encountering.

        Serial debug logs and/or debugger logs are especially helpful!

        Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
    validations:
      required: false
