Class IssueReportUrl
The suite's bug report template asks for the MegaMek version, operating system and Java version, all of them
required, and instructs the player to find them by opening megamek.log in a text editor and reading its
header. MegaMek already knows all three, so this class puts them into the form's URL and spares the player the
transcription.
MegaMek, MegaMekLab and MekHQ all use GitHub issue forms whose field ids are identical, so a single query
string serves all three and only the repository differs. The field ids below are a contract with
.github/ISSUE_TEMPLATE/bug_report.yml in each of those repositories: if a field id is renamed there, the
corresponding field here silently stops being filled in, without any error.
The labels query parameter is deliberately never set. GitHub requires the visitor to hold
permission for any action a query parameter performs, and serves a 404 page when they do not. Since ordinary
players have no triage permission on the suite's repositories, adding a labels parameter would replace the
issue form with a 404 for exactly the people this feature exists to help, while continuing to work for every
maintainer who tested it. Labelling belongs to the issue template, which applies its labels for every reporter
regardless of permission.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringforIssueForm(String repositoryIssuesUrl) Builds a prefilled issue-form URL for one of the repositories that uses the suite bug report template.
-
Field Details
-
MEGAMEK_ISSUES_URL
The issue links of the three repositories that share the suite bug report template.- See Also:
-
MEGAMEKLAB_ISSUES_URL
- See Also:
-
MEKHQ_ISSUES_URL
- See Also:
-
-
Method Details
-
forIssueForm
Builds a prefilled issue-form URL for one of the repositories that uses the suite bug report template.If the URL would exceed
MAX_URL_LENGTHthe link is returned exactly as it was given, with no prefilled fields. A truncated URL is never produced, since that would land the player on a 404.- Parameters:
repositoryIssuesUrl- the repository's issue link, in either the/issues/new/chooseor/issues/newform- Returns:
- a URL that opens the issue form with the environment fields populated
-