Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// to distinguish one build from another. AssemblyFileVersion is specified
// in AssemblyVersionInfo.cs so that it can be easily incremented by the
// automated build process.
[assembly: AssemblyVersion("3.5.0.6885")]
[assembly: AssemblyVersion("3.5.0.7533")]


// By default, the "Product version" shown in the file properties window is
Expand All @@ -64,4 +64,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("3.5.0.6885")]
[assembly: AssemblyFileVersion("3.5.0.7533")]
9 changes: 4 additions & 5 deletions src/DynamoCoreWpf/Utilities/CrashUtilities.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
using Dynamo.Configuration;
using Dynamo.Configuration;
using Dynamo.PackageManager;
using Dynamo.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Dynamo.Wpf.Utilities
{
static class CrashUtilities
{
internal static string GithubNewIssueUrlFromCrashContent(object crashContent)
internal static string GithubNewIssueUrlFromCrashContent(object crashContent, string reportType = "Crash")
{
var baseUri = new UriBuilder(Configurations.GitHubBugReportingLink);

var issueTitle = "Crash report from Dynamo {0}";
var issueTitle = "{0} report from Dynamo {1}";
var dynamoVersion = AssemblyHelper.GetDynamoVersion().ToString() ?? "2.1.0+";

// append the title and body to the URL as query parameters
// making sure we properly escape content since stack traces may contain characters not suitable
// for use in URLs
var title = "title=" + Uri.EscapeDataString(string.Format(issueTitle, dynamoVersion));
var title = "title=" + Uri.EscapeDataString(string.Format(issueTitle, reportType, dynamoVersion));
Copy link
Contributor

@QilongTang QilongTang Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been a while, can you double check here if reportType would be number or string. I remember vaguely that the real value of Enums will be number and you may need to grab the name of the Enum specifically here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears to pull the string from the enum on the string formatting portion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for checking @johnpierson maybe the string.Format took care of it underneath already.

var template = "template=issue.yml";
var fields = "dynamo_version=" + Uri.EscapeDataString(dynamoVersion)
+ "&os=" + Uri.EscapeDataString(Environment.OSVersion.ToString())
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);
var urlWithParameters = Wpf.Utilities.CrashUtilities.GithubNewIssueUrlFromCrashContent(bodyContent, "Issue");

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