From c5de743214c2c20c31dcebd2f5007c542c5a716d Mon Sep 17 00:00:00 2001 From: san7890 Date: Sun, 18 Aug 2024 13:59:59 -0600 Subject: [PATCH] Migrates Issue Reporting to the New GitHub Template Format (#85909) ## About The Pull Request Screenshots slightly outdated, check it out here for the latest: https://github.com/san7890/bruhstation/blob/issue-reporting/.github/ISSUE_TEMPLATE/bug_report_form.yml Gone are the days of copypasting markdowns and people leaving out important information! A much cleaner form is upon us! ![image](https://github.com/user-attachments/assets/9639014d-5206-405a-901f-ddcba1f48c1e) First off, the button will now automatically redirect people to the forums for feature requests. No more accidental entries through blank MDs, should be a lot cleaner. If it is a valid issue report, you'll be navigated to this menu. No more having to worry about putting comments in the input field as the important information is fully visible in the form:
Template Image ![image](https://github.com/user-attachments/assets/580a0162-7e99-491d-9dc2-98e0c07e6eaf)
This will be the end result of filling in all the fields:
End Result ![image](https://github.com/user-attachments/assets/59dd1eb4-29ba-48f4-b989-7cbafcdab5e0) ```md ### Client Version 515.1642 ### Issue Summary insert blank here ### Round ID _No response_ ### Test Merges perhaps ### Reproduction steps alirght ```
I updated the BYOND-side code to ensure that this would work just as it did prior, auto-filling the applicable fields that we generate ingame. ## Why It's Good For The Game Far more clarity to people who wish to report issues, no more worrying about comment formatting, can have mandatory fields, just a cleaner experience overall. ## Changelog :cl: qol: Reporting issues on the Github should now be a far more simpler experience. Hitting the "Report Issue" button in the top-right of your BYOND Client Screen will still autofill in the fields as expected. /:cl: Ignore how dumb the commit history of this branch is. --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.md | 29 ---------- .github/ISSUE_TEMPLATE/bug_report_form.yml | 65 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 4 ++ .github/ISSUE_TEMPLATE/feature_request.md | 7 --- interface/interface.dm | 66 +++++++++++----------- 5 files changed, 102 insertions(+), 69 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report_form.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 904de8b36c9a9..0000000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: Bug report -about: Create a report to help reproduce and fix the issue ---- - - -## Issue Summary - - - -## Round ID: - - - - - -## Testmerges: - - - -## Reproduction: - - - - - - diff --git a/.github/ISSUE_TEMPLATE/bug_report_form.yml b/.github/ISSUE_TEMPLATE/bug_report_form.yml new file mode 100644 index 0000000000000..f64b772437fc9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report_form.yml @@ -0,0 +1,65 @@ +name: Bug Report +description: Create a report to help reproduce and fix the issue. +body: + - type: markdown + attributes: + value: | + # **Please read the following guidelines. Follow all instructions or else your issue is subject to closure.** + ## If you use the "Report Issue" button in the top-right corner of the game, it will automatically fill in some of the information below. + + If you are reporting an issue found in another branch or codebase, you _must_ link the branch or codebase repo in your issue report or it will be closed. + For branches, If you have not pushed your code up, please either reproduce it on master or push your code up before making an issue report. + For other codebases, if you do not have a public code repository you will be refused help unless you can completely reproduce the issue on our master branch. + - type: input + id: reporting-version + attributes: + label: "Client Version:" + description: | + The BYOND version you are using to report this issue. You can find this information in the bottom left corner of the "About BYOND" window in the BYOND client. + It is strongly recommended that you include this, especially for concerns on the visual aspects of the game. + placeholder: "xxx.xxxx" + validations: + required: false + - type: textarea + id: issue-summary + attributes: + label: "Issue Summary:" + description: | + Briefly explain your issue in a few plain sentences. You may copy and paste the issue title here if it is suitable. + placeholder: | + "When I do X, Y happens instead of Z." + "X on Y map has Z issue." + validations: + required: true + - type: input + id: round-id + attributes: + label: "Round ID:" + description: | + If you discovered this issue from playing tgstation hosted servers, the Round ID can be found in the Status panel or retrieved from https://statbus.space/ + The Round ID lets us look up valuable information and logs for the round the bug happened. Leave this blank if there is no round ID. + placeholder: "XXXXXX" + validations: + required: false + - type: textarea + id: test-merges + attributes: + label: "Test Merge Information:" + description: | + If you're certain the issue is to be caused by a test merge [OOC Tab -> Show Server Revision], report it in the pull request's comment section rather than on the tracker. + If you're unsure you can refer to the issue number by prefixing said number with #. The issue number can be found beside the title after submission of this form. + validations: + required: false + - type: textarea + id: reproduction + attributes: + label: "Reproduction Steps:" + description: | + Describe the steps to reproduce the issue in detail. Include any relevant information, such as the map, round type, and any other factors that may be relevant. + If it is a runtime-related error, please include the runtime here as that is pertient information. Issues are not for oddities introduced by admin varedits, ensure these occur in normal circumstances. + placeholder: | + 1. Go to the X location + 2. Do Y action + 3. Observe Z result + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000000..e4f8cb0b767ca --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,4 @@ +contact_links: + - name: Feature Requests + url: https://tgstation13.org/phpBB/viewforum.php?f=9 + about: Post feature requests and suggestions on the forums. This repository does not handle them. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 11687283df4c7..0000000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -Feature requests are not handled in the repository. The best place to discuss these ideas would be on the /tg/station 13 forums here: https://tgstation13.org/phpBB/viewforum.php?f=9&sid=5153c1c704a4fb1006bf7a265e45e03f diff --git a/interface/interface.dm b/interface/interface.dm index a32bb758a204f..c90abd9583c45 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -58,45 +58,45 @@ set desc = "Report an issue" set hidden = TRUE var/githuburl = CONFIG_GET(string/githuburl) - if(githuburl) - var/message = "This will open the Github issue reporter in your browser. Are you sure?" - if(GLOB.revdata.testmerge.len) - message += "
The following experimental changes are active and are probably the cause of any new or sudden issues you may experience. If possible, please try to find a specific thread for your issue instead of posting to the general issue tracker:
" - message += GLOB.revdata.GetTestMergeInfo(FALSE) - // We still use tgalert here because some people were concerned that if someone wanted to report that tgui wasn't working - // then the report issue button being tgui-based would be problematic. - if(tgalert(src, message, "Report Issue","Yes","No")!="Yes") - return + if(!githuburl) + to_chat(src, span_danger("The Github URL is not set in the server configuration.")) + return - // Keep a static version of the template to avoid reading file - var/static/issue_template = file2text(".github/ISSUE_TEMPLATE/bug_report.md") + var/testmerge_data = GLOB.revdata.testmerge + var/has_testmerge_data = (length(testmerge_data) != 0) - // Get a local copy of the template for modification - var/local_template = issue_template + var/message = "This will open the Github issue reporter in your browser. Are you sure?" + if(has_testmerge_data) + message += "
The following experimental changes are active and are probably the cause of any new or sudden issues you may experience. If possible, please try to find a specific thread for your issue instead of posting to the general issue tracker:
" + message += GLOB.revdata.GetTestMergeInfo(FALSE) - // Remove comment header - var/content_start = findtext(local_template, "<") - if(content_start) - local_template = copytext(local_template, content_start) + // We still use tgalert here because some people were concerned that if someone wanted to report that tgui wasn't working + // then the report issue button being tgui-based would be problematic. + if(tgalert(src, message, "Report Issue","Yes","No") != "Yes") + return - // Insert round - if(GLOB.round_id) - local_template = replacetext(local_template, "## Round ID:\n", "## Round ID:\n[GLOB.round_id]") + var/base_link = githuburl + "/issues/new?template=bug_report_form.yml" + var/list/concatable = list(base_link) - // Insert testmerges - if(GLOB.revdata.testmerge.len) - var/list/all_tms = list() - for(var/entry in GLOB.revdata.testmerge) - var/datum/tgs_revision_information/test_merge/tm = entry - all_tms += "- \[[tm.title]\]([githuburl]/pull/[tm.number])" - var/all_tms_joined = all_tms.Join("\n") // for some reason this can't go in the [] - local_template = replacetext(local_template, "## Testmerges:\n", "## Testmerges:\n[all_tms_joined]") + var/client_version = "[byond_version].[byond_build]" + concatable += ("&reporting-version=" + client_version) + + // the way it works is that we use the ID's that are baked into the template YML and replace them with values that we can collect in game. + if(GLOB.round_id) + concatable += ("&round-id=" + GLOB.round_id) + + // Insert testmerges + if(has_testmerge_data) + var/list/all_tms = list() + for(var/entry in testmerge_data) + var/datum/tgs_revision_information/test_merge/tm = entry + all_tms += "- \[[tm.title]\]([githuburl]/pull/[tm.number])" + var/all_tms_joined = jointext(all_tms, "%0A") // %0A is a newline for URL encoding because i don't trust \n to not break + + concatable += ("&test-merges=" + all_tms_joined) + + DIRECT_OUTPUT(src, link(jointext(concatable, ""))) - var/url_params = "Reporting client version: [byond_version].[byond_build]\n\n[local_template]" - DIRECT_OUTPUT(src, link("[githuburl]/issues/new?body=[url_encode(url_params)]")) - else - to_chat(src, span_danger("The Github URL is not set in the server configuration.")) - return /client/verb/changelog() set name = "Changelog"