From 0883b1a5ebadae1aeb0bc9ae4bc503268f51868c Mon Sep 17 00:00:00 2001 From: Agent Date: Sun, 5 Apr 2026 19:21:27 +0000 Subject: [PATCH] fix: feat: add bug report issue template with required reproduction steps (#251) --- bin/disinto | 32 ++++++++++++++++++++++++++++++++ templates/issue/bug.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 templates/issue/bug.md diff --git a/bin/disinto b/bin/disinto index 48b4526..242459a 100755 --- a/bin/disinto +++ b/bin/disinto @@ -1440,6 +1440,35 @@ EOF echo " Commit this to your repo when ready" } +# Copy issue templates from templates/ to target project repo. +copy_issue_templates() { + local repo_root="$1" + local template_dir="${FACTORY_ROOT}/templates" + local target_dir="${repo_root}/.forgejo/ISSUE_TEMPLATE" + + # Skip if templates directory doesn't exist + if [ ! -d "$template_dir" ]; then + return + fi + + # Create target directory + mkdir -p "$target_dir" + + # Copy each template file if it doesn't already exist + for template in "$template_dir"/*; do + [ -f "$template" ] || continue + local filename + filename=$(basename "$template") + local target_path="${target_dir}/${filename}" + if [ ! -f "$target_path" ]; then + cp "$template" "$target_path" + echo "Copied: ${target_path}" + else + echo "Skipped: ${target_path} (already exists)" + fi + done +} + # Generate and optionally install cron entries for the project agents. install_cron() { local name="$1" toml="$2" auto_yes="$3" bare="${4:-false}" @@ -2050,6 +2079,9 @@ p.write_text(text) # Generate template deployment pipeline configs in project repo generate_deploy_pipelines "$repo_root" "$project_name" + # Copy issue templates to target project + copy_issue_templates "$repo_root" + # Install cron jobs install_cron "$project_name" "$toml_path" "$auto_yes" "$bare" diff --git a/templates/issue/bug.md b/templates/issue/bug.md new file mode 100644 index 0000000..9223e84 --- /dev/null +++ b/templates/issue/bug.md @@ -0,0 +1,28 @@ +--- +name: Bug Report +about: Report a bug or unexpected behavior +labels: bug-report +--- + +## What happened + + + +## What was expected + + + +## Steps to reproduce + + +1. +2. +3. + +## Environment + + +- Browser/Client: +- Wallet (if applicable): +- Network (if applicable): +- Version: