Skip to content

Commit

Permalink
Exclude stack trace from being included in the new GitHub issues requ…
Browse files Browse the repository at this point in the history
…est (#9523)

* excluded stack trace from un-authenticated get request

* update crash reporter tests
  • Loading branch information
alfarok authored Feb 27, 2019
1 parent 05647ec commit beafb90
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
23 changes: 16 additions & 7 deletions src/DynamoCoreWpf/Utilities/CrashUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,29 @@ internal static string BuildMarkdownContent(string dynamoVersion, string stackTr
{
return
"# Issue Description" + Environment.NewLine +
"Please fill in the following information to help us reproduce the issue:" + Environment.NewLine +
"Please fill in the following information to help us reproduce the issue:" + Environment.NewLine + Environment.NewLine +

"### What did you do?" + Environment.NewLine +
"(Fill in here)" + Environment.NewLine +
"(Fill in here)" + Environment.NewLine + Environment.NewLine +

"### What did you expect to see?" + Environment.NewLine +
"(Fill in here)" + Environment.NewLine +
"(Fill in here)" + Environment.NewLine + Environment.NewLine +

"### What did you see instead?" + Environment.NewLine +
"(Fill in here)" + Environment.NewLine +
"### What packages or external references (if any) were used?" + Environment.NewLine +
"(Fill in here)" + Environment.NewLine + Environment.NewLine +

"### What packages or external references (if any) were used?" + Environment.NewLine +
"(Fill in here)" + Environment.NewLine + Environment.NewLine + Environment.NewLine +

"### Stack Trace" + Environment.NewLine +
"```" + Environment.NewLine +
"(From the Dynamo crash window select 'Details' -> 'Copy' and paste here)" + Environment.NewLine +
"```" + Environment.NewLine + Environment.NewLine +

"---" + Environment.NewLine +
"OS: " + "`" + Environment.OSVersion + "`" + Environment.NewLine +
"CLR: " + "`" + Environment.Version + "`" + Environment.NewLine +
"Dynamo: " + "`" + dynamoVersion + "`" + Environment.NewLine +
"Details: " + Environment.NewLine + "```" + Environment.NewLine + stackTrace + Environment.NewLine + "```";
"Dynamo: " + "`" + dynamoVersion + "`" + Environment.NewLine;
}
}
}
10 changes: 4 additions & 6 deletions test/DynamoCoreWpfTests/CrashReportingTests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using Dynamo.ViewModels;
using Dynamo.Utilities;
using NUnit.Framework;

namespace Dynamo.Tests
Expand Down Expand Up @@ -78,7 +75,7 @@ public void CanReportBugWithContent()
public void StackTraceIncludedInReport()
{
// Mock Dynamo version
var dynamoVersion = "2.1.0";
var dynamoVersion = AssemblyHelper.GetDynamoVersion().ToString();

// Create a crash report to submit
var crashReport = Wpf.Utilities.CrashUtilities.BuildMarkdownContent(dynamoVersion, StackTrace);
Expand All @@ -97,8 +94,9 @@ public void StackTraceIncludedInReport()
// Verify request contains the dynamoVersion
Assert.True(decoded.Contains(dynamoVersion));

// TODO - Can be re-added when stack traces are uploaded automatically (currently manual)
// Verify request contains the stack trace
Assert.True(decoded.Contains(StackTrace));
// Assert.True(decoded.Contains(StackTrace));
}
}
}

0 comments on commit beafb90

Please sign in to comment.