Merge pull request #1427 from vector-im/ease_crashes_triaging

Bug Report: Make the crash dump appear in GH issues created for crashes.
This commit is contained in:
manuroe 2017-08-08 14:44:13 +02:00 committed by GitHub
commit 2b3f59023e

View file

@ -284,8 +284,18 @@
[gitHubLabels addObject:versionLabel];
}
NSMutableString *bugReportDescription = [NSMutableString stringWithString:_bugReportDescriptionTextView.text];
if (_reportCrash)
{
// Append the crash dump to the user description in order to ease triaging of GH issues
NSString *crashLogFile = [MXLogger crashLog];
NSString *crashLog = [NSString stringWithContentsOfFile:crashLogFile encoding:NSUTF8StringEncoding error:nil];
[bugReportDescription appendFormat:@"\n\n\n--------------------------------------------------------------------------------\n\n%@", crashLog];
}
// Submit
[bugReportRestClient sendBugReport:_bugReportDescriptionTextView.text sendLogs:_sendLogs sendCrashLog:_reportCrash sendFiles:files attachGitHubLabels:gitHubLabels progress:^(MXBugReportState state, NSProgress *progress) {
[bugReportRestClient sendBugReport:bugReportDescription sendLogs:_sendLogs sendCrashLog:_reportCrash sendFiles:files attachGitHubLabels:gitHubLabels progress:^(MXBugReportState state, NSProgress *progress) {
switch (state)
{