Skip to content

Commit

Permalink
Issue reporting (#43)
Browse files Browse the repository at this point in the history
* Create config.yml

* Create config.yml (#40)

* Delete feature_request.md

* Issue reporting (#41)

* Create config.yml

* Delete feature_request.md

* formified

* oops

* Update bug_report_form.yml

* Update bug_report_form.yml

* Update bug_report_form.yml

* Update bug_report_form.yml

* Update bug_report_form.yml

* Update bug_report_form.yml

* dm side workings

* brugh

* finalization
  • Loading branch information
san7890 authored Aug 16, 2024
1 parent 636f6fe commit bf8917b
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 70 deletions.
29 changes: 0 additions & 29 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report_form.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Bug report
description: Create a report to help reproduce and fix the issue.
body:
- type: markdown
attributes:
value: |
## **Please read the following guidelines and follow all guidelines or else your issue is subject to closure.**
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, you must 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 repo you will be refused help unless you can completely reproduce the issue on our code.
- 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.
placeholder: "515.1642"
validations:
required: true
- 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://sb.atlantaned.space/rounds
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: "123456"
validations:
required: false
- type: textarea
id: test-merges
attributes:
label: Test Merges
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 submitting it to the tracker.
If no testmerges are active, feel free to leave this section blank.
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
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
blank_issues_enabled: false
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.

7 changes: 0 additions & 7 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

65 changes: 31 additions & 34 deletions interface/interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,46 +57,43 @@
set name = "report-issue"
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 += "<br>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:<br>"
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
var/githuburl = "https://github.com/san7890/bruhstation" //san7890 fix me
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/message = "This will open the Github issue reporter in your browser. Are you sure?"
if(GLOB.revdata.testmerge.len)
message += "<br>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:<br>"
message += GLOB.revdata.GetTestMergeInfo(FALSE)

// Get a local copy of the template for modification
var/local_template = issue_template
// 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

// Remove comment header
var/content_start = findtext(local_template, "<")
if(content_start)
local_template = copytext(local_template, content_start)
var/base_link = githuburl + "/issues/new?template=bug_report_form.yml"
var/list/concatable = list(base_link)

// Insert round
if(GLOB.round_id)
local_template = replacetext(local_template, "## Round ID:\n", "## Round ID:\n[GLOB.round_id]")
var/client_version = "[byond_version].[byond_build]"
concatable += ("&reporting-version=" + client_version)

// 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]")
// 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(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 = jointext(all_tms, "\n") // for some reason this can't go in the []

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"
Expand Down

0 comments on commit bf8917b

Please sign in to comment.