Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# Windows Implementation Library submodule
/wil/ @microsoft/driver-samples-maintainers

# Samples

# Audio
/audio/ @microsoft/windowsaudio

Expand Down
75 changes: 75 additions & 0 deletions .github/ISSUE_TEMPLATE/sample_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Issue with a sample
description: Report a problem you have with a specific sample.
title: '[path/to/sample]: '
body:
- type: dropdown
id: Sample Area
attributes:
label: Which is the area where the sample lives?
description: Select the area where you're experiencing the problem.
options:
- /audio/
- /bluetooth/
- /avstream/
- /general/SimpleMediaSource/
- /network/wwan/
- /nfc/
- /gnss/
- /network/radio/
- /network/wsk/
- /sd/
- /smartcrd/
- /gpio/
- /pofx/PEP/
- /prm/
- /wmi/wmiacpi/
- /general/SystemDma/
- /video/
- /tools/
- /pofx/WDF/
- /powerlimit/
- /simbatt/
- /thermal/
- /general/perfcounters/
- /general/tracing/
- /filesys/cdfs/
- /filesys/fastfat/
- /filesys/miniFilter/
- /general/cancel/
- /general/event/
- /general/registry/
- /network/config/
- /network/modem/
- /network/ndis/
- /network/trans/
- /security/
- /TrEE/
- /general/DCHU/
- /setup/
- /print/
- /wia/
- /sensors/
- /storage/
- /general/echo/
- /general/ioctl/
- /general/pcidrv/
- /general/PLX9x5x/
- /general/toaster/
- /hid/
- /input/
- /pofx/UMDF2/
- /serial/
- /spb/
- /usb/
- /wmi/wmisamp/
- /pos/
- /network/wlan/
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe the issue
description: Provide a clear and concise description of what the issue is.
validations:
required: true
66 changes: 66 additions & 0 deletions .github/ISSUE_TEMPLATE/sample_issue_generator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import re
import yaml

# Read the CODEOWNERS file
with open("../CODEOWNERS", "r") as file:
lines = file.readlines()

# Parse the CODEOWNERS file to extract areas and their paths
areas = {}
sample_section_found = False

for line in lines:
line = line.strip()
if line.startswith("# Samples"):
sample_section_found = True
continue

if sample_section_found:
if line.startswith("#"):
continue
elif line:
path, codeowner = line.split()
if path in areas:
raise ValueError(f"{path} has been found two times inside CODEOWNERS file")
areas[path] = codeowner

# Generate the YAML structure
yaml_form = {
"name": "Issue with a sample",
"description": "Report a problem you have with a specific sample.",
"title": "[path/to/sample]: ",
"body": []
}

dropdown = {
"type": "dropdown",
"id": "Sample Area",
"attributes": {
"label": "Which is the area where the sample lives?",
"description": "Select the area where you're experiencing the problem.",
"options": [path for path, codeowner in areas.items()]
},
"validations": {
"required": True
}
}

# Add a description field
description_field = {
"type": "textarea",
"id": "description",
"attributes": {
"label": "Describe the issue",
"description": "Provide a clear and concise description of what the issue is."
},
"validations": {
"required": True
}
}

yaml_form["body"].append(dropdown)
yaml_form["body"].append(description_field)

# Write the YAML to a file
with open("sample_issue.yml", "w") as outfile:
yaml.dump(yaml_form, outfile, sort_keys=False)