Skip to content

Commit

Permalink
Change ReportType from string to Enum
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpierson committed Jan 23, 2025
1 parent 059637a commit 4f2b756
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/DynamoCoreWpf/Utilities/CrashUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ namespace Dynamo.Wpf.Utilities
{
static class CrashUtilities
{
internal static string GithubNewIssueUrlFromCrashContent(object crashContent, string reportType = "Crash")
public enum ReportType
{
Bug,
Crash
}

internal static string GithubNewIssueUrlFromCrashContent(object crashContent, ReportType reportType = ReportType.Crash)
{
var baseUri = new UriBuilder(Configurations.GitHubBugReportingLink);

Expand Down
2 changes: 1 addition & 1 deletion src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ internal bool CanDisplayFunction(object parameters)
/// <param name="bodyContent">Crash details body. If null, nothing will be filled-in.</param>
public static void ReportABug(object bodyContent)
{
var urlWithParameters = Wpf.Utilities.CrashUtilities.GithubNewIssueUrlFromCrashContent(bodyContent, "Issue");
var urlWithParameters = Wpf.Utilities.CrashUtilities.GithubNewIssueUrlFromCrashContent(bodyContent, CrashUtilities.ReportType.Bug);

// launching the process using explorer.exe will format the URL incorrectly
// and Github will not recognise the query parameters in the URL
Expand Down

0 comments on commit 4f2b756

Please sign in to comment.