From 2b61d4c081777d0428739b0528003197f1564f43 Mon Sep 17 00:00:00 2001 From: Matt bc Date: Tue, 3 Oct 2017 14:56:07 -0700 Subject: [PATCH] Add config to issue report template (#2293) * fixes #1789 --- app/menus/menus/help.js | 54 +++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/app/menus/menus/help.js b/app/menus/menus/help.js index 39a33deb..6f920c8c 100644 --- a/app/menus/menus/help.js +++ b/app/menus/menus/help.js @@ -1,6 +1,10 @@ -const os = require('os'); +const {release} = require('os'); const {app, shell} = require('electron'); +const {getConfig, getPlugins} = require('../../config'); +const {arch, env, platform, versions} = process; +const {version} = require('../../package.json'); + module.exports = (commands, showAbout) => { const submenu = [ { @@ -13,11 +17,48 @@ module.exports = (commands, showAbout) => { label: 'Report Issue', click() { const body = ` - - - - ${app.getName()} ${app.getVersion()} - Electron ${process.versions.electron} - ${process.platform} ${process.arch} ${os.release()}`; + + + - [ ] Your Hyper.app version is **${version}**. Please verify your using the [latest](https://github.com/zeit/hyper/releases/latest) Hyper.app version + - [ ] I have searched the [issues](https://github.com/zeit/hyper/issues) of this repo and believe that this is not a duplicate + + --- + - **Any relevant information from devtools?** _(CMD+ALT+I on macOS, CTRL+SHIFT+I elsewhere)_: + + + - **Is the issue reproducible in vanilla Hyper.app?** + + +## Issue + + + + + + + + + - **${app.getName()} version**: ${env.TERM_PROGRAM_VERSION} "${app.getVersion()}" + + - **OS ARCH VERSION:** ${platform} ${arch} ${release()} + - **Electron:** ${versions.electron} **LANG:** ${env.LANG} + - **SHELL:** ${env.SHELL} **TERM:** ${env.TERM} + +
+ ~/.hyper.js contents +
+        
+          ${JSON.stringify(getConfig(), null, 2)}
+
+          ${JSON.stringify(getPlugins(), null, 2)}
+        
+      
+
`; shell.openExternal(`https://github.com/zeit/hyper/issues/new?body=${encodeURIComponent(body)}`); } @@ -35,7 +76,6 @@ module.exports = (commands, showAbout) => { } ); } - return { role: 'help', submenu