From ffb3118064017060d36d3b634bccf5ea5aa4fc5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E4=B8=80=E4=BA=8C?= Date: Tue, 8 Jun 2021 22:38:22 +0800 Subject: [PATCH] docs: update auto-created issue template --- .eslintrc.js | 1 + src/main.ts | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 4477a1c8..e8eda99e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -52,6 +52,7 @@ module.exports = { 'unicorn/prefer-module': 'off', '@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/method-signature-style': 'off', + 'unicorn/prefer-string-slice': 'off', 'unicorn/no-array-reduce': 'off', '@typescript-eslint/member-delimiter-style': [ 'warn', diff --git a/src/main.ts b/src/main.ts index 1de21b88..baf5cb12 100755 --- a/src/main.ts +++ b/src/main.ts @@ -207,8 +207,28 @@ if (!isTest) { user: 'tiddly-gittly', repo: 'TiddlyGit-Desktop', template: 'bug.md', - title: `bug: ${error.message}`, - body: `\`\`\`\n${error.stack ?? 'No error.stack'}\n\`\`\`\n\n---\n\n${debugInfo()}`, + title: `bug: ${(error.message ?? '').substring(0, 100)}`, + body: `## Environment + +${debugInfo()} + +## Description: + + + +## Steps to Reproduce: + + + +## Additional Context + +\`\`\`typescript\n${error.stack ?? 'No error.stack'}\n\`\`\` + +--- + + + +`, }); }, });