diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index 0c0abf96..ae79c852 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -7,8 +7,18 @@ assignees: '' --- + + ## Bug Report - #### Current Behavior @@ -19,13 +29,16 @@ assignees: '' #### Additional context/Screenshots +#### Possible Solution + + #### Environment - Starship version: [the output of `starship --version`] - Shell type: [fish, zsh] - Shell version: [the output of `fish --version` or `zsh --version`] - Shell plugin manager: [e.g. oh-my-fish, oh-my-zsh, fisher, antigen] - Terminal emulator: [e.g. iTerm, Hyper, Terminator] -- Operating system: [e.g. OSX 10.13.4, Windows 10] +- Operating system: [e.g. macOS 10.13.4, Windows 10] #### Relevant Shell Configuration + ```bash # Your configuration here ``` - -#### Possible Solution - diff --git a/src/bug_report.rs b/src/bug_report.rs index 056fc3ab..0ba8e840 100644 --- a/src/bug_report.rs +++ b/src/bug_report.rs @@ -47,14 +47,12 @@ struct Environment { } fn make_github_issue_link(starship_version: &str, environment: Environment) -> String { - let title = urlencoding::encode("Bug Report:"); + let template_filename = urlencoding::encode("Bug_report.md"); let body = urlencoding::encode(&format!(" @@ -69,6 +67,9 @@ fn make_github_issue_link(starship_version: &str, environment: Environment) -> S #### Additional context/Screenshots +#### Possible Solution + + #### Environment - Starship version: {starship_version} - {shell_name} version: {shell_version} @@ -84,22 +85,19 @@ fn make_github_issue_link(starship_version: &str, environment: Environment) -> S ```toml {starship_config} -``` - -#### Possible Solution -", - starship_version = starship_version, - shell_name = environment.shell_info.name, - shell_version = environment.shell_info.version, - os_name = environment.os_type, - os_version = environment.os_version, - shell_config = environment.shell_info.config, - starship_config = environment.starship_config, +```", + starship_version = starship_version, + shell_name = environment.shell_info.name, + shell_version = environment.shell_info.version, + os_name = environment.os_type, + os_version = environment.os_version, + shell_config = environment.shell_info.config, + starship_config = environment.starship_config, )); format!( - "https://github.com/starship/starship/issues/new?title={}&body={}", - title, body + "https://github.com/starship/starship/issues/new?template={}&body={}", + template_filename, body ) }