diff --git a/.github/DISCUSSION_TEMPLATE/bugs-cmake-meson-nix.yml b/.github/DISCUSSION_TEMPLATE/bugs-cmake-meson-nix.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs-cmake-meson-nix.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs-cmake-meson-nix.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/.github/DISCUSSION_TEMPLATE/bugs-config.yml b/.github/DISCUSSION_TEMPLATE/bugs-config.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs-config.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs-config.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/.github/DISCUSSION_TEMPLATE/bugs-crashes.yml b/.github/DISCUSSION_TEMPLATE/bugs-crashes.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs-crashes.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs-crashes.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/.github/DISCUSSION_TEMPLATE/bugs-drm.yml b/.github/DISCUSSION_TEMPLATE/bugs-drm.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs-drm.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs-drm.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/.github/DISCUSSION_TEMPLATE/bugs-input.yml b/.github/DISCUSSION_TEMPLATE/bugs-input.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs-input.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs-input.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/.github/DISCUSSION_TEMPLATE/bugs-ipc-plugins.yml b/.github/DISCUSSION_TEMPLATE/bugs-ipc-plugins.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs-ipc-plugins.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs-ipc-plugins.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/.github/DISCUSSION_TEMPLATE/bugs-layout.yml b/.github/DISCUSSION_TEMPLATE/bugs-layout.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs-layout.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs-layout.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/.github/DISCUSSION_TEMPLATE/bugs-other.yml b/.github/DISCUSSION_TEMPLATE/bugs-other.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs-other.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs-other.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/.github/DISCUSSION_TEMPLATE/bugs-performance.yml b/.github/DISCUSSION_TEMPLATE/bugs-performance.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs-performance.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs-performance.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/.github/DISCUSSION_TEMPLATE/bugs-renderer.yml b/.github/DISCUSSION_TEMPLATE/bugs-renderer.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs-renderer.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs-renderer.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/.github/DISCUSSION_TEMPLATE/bugs-window-management.yml b/.github/DISCUSSION_TEMPLATE/bugs-window-management.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs-window-management.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs-window-management.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/.github/DISCUSSION_TEMPLATE/bugs-xwayland.yml b/.github/DISCUSSION_TEMPLATE/bugs-xwayland.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs-xwayland.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs-xwayland.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/.github/DISCUSSION_TEMPLATE/bugs.yml b/.github/DISCUSSION_TEMPLATE/bugs.yml index 6ff146d58..2b3761591 100644 --- a/.github/DISCUSSION_TEMPLATE/bugs.yml +++ b/.github/DISCUSSION_TEMPLATE/bugs.yml @@ -14,6 +14,15 @@ body: v0.xx.x validations: required: true + - type: dropdown + attributes: + label: Is this a regression? (used to work, doesn't anymore) + multiple: false + options: + - Yes + - No + validations: + required: true - type: textarea attributes: label: What's the bug? diff --git a/meta/generateDiscussionTemplates.sh b/meta/generateDiscussionTemplates.sh new file mode 100755 index 000000000..e3e02a4b3 --- /dev/null +++ b/meta/generateDiscussionTemplates.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +set -euo pipefail + +dir="${1:-.github/DISCUSSION_TEMPLATE}" + +bugs=( + bugs-cmake-meson-nix.yml + bugs-config.yml + bugs-crashes.yml + bugs-drm.yml + bugs-input.yml + bugs-ipc-plugins.yml + bugs-layout.yml + bugs-other.yml + bugs-performance.yml + bugs-renderer.yml + bugs-window-management.yml + bugs-xwayland.yml +) + +features=( + feature-requests-config.yml + feature-requests-layouts.yml + feature-requests-other.yml + feature-requests-protocols-integrations.yml + feature-requests-renderer.yml + feature-requests-window-management.yml +) + +generate_templates() { + local source="$1" + shift + + if [[ ! -f "$dir/$source" ]]; then + printf 'error: source template not found: %s\n' "$dir/$source" >&2 + return 1 + fi + + local filename + for filename in "$@"; do + cp -- "$dir/$source" "$dir/$filename" + printf 'generated %s from %s\n' "$filename" "$source" + done +} + +generate_templates bugs.yml "${bugs[@]}" +generate_templates features.yml "${features[@]}" \ No newline at end of file