From cf33678b6d26d624f241abdf85bb275baf1cab0b Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Tue, 20 Sep 2022 18:50:31 -0500 Subject: [PATCH 1/6] Add another link to complain to me about an error --- src/job/JobListener.ts | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/src/job/JobListener.ts b/src/job/JobListener.ts index 630a69f5..fc1098be 100644 --- a/src/job/JobListener.ts +++ b/src/job/JobListener.ts @@ -51,6 +51,8 @@ export default class JobListener { logFilePath, `Log for CircleCI® job ${jobName} \n${new Date()} \n\n` ); + const complainToMeLink = + 'mailto:ryan@getlocalci.com?subject=There was an error using Local CI&body=Hi Ryan, Could you help with this error I saw with Local CI: '; const process = this.childProcessGateway.cp.spawn( '/bin/sh', @@ -124,10 +126,19 @@ export default class JobListener { dockerRelatedErrors.forEach((errorMessage) => { if (output?.includes(errorMessage)) { - this.editorGateway.editor.window.showErrorMessage( - `Restarting Docker Desktop should fix that error '${errorMessage}', though that's not fun`, - { detail: 'Possible solution' } - ); + const complainToMeText = 'Complain to me'; + this.editorGateway.editor.window + .showErrorMessage( + `Restarting Docker Desktop should fix that error '${errorMessage}', though that's not fun`, + { detail: 'Possible solution' } + ) + .then((clicked) => { + if (clicked === complainToMeText) { + this.editorGateway.editor.env.openExternal( + this.editorGateway.editor.Uri.parse(complainToMeLink) + ); + } + }); } }); @@ -152,11 +163,13 @@ export default class JobListener { errors.forEach((error) => { if (output?.includes(error.message)) { const getBashCommandsText = 'Get Bash commands'; + const complainToMeText = 'Complain to me'; this.editorGateway.editor.window .showErrorMessage( 'You might be able to fix this failed job with Bash commands', { detail: 'Possible solution' }, - getBashCommandsText + getBashCommandsText, + complainToMeText ) .then((clicked) => { if (clicked === getBashCommandsText) { @@ -164,6 +177,12 @@ export default class JobListener { this.editorGateway.editor.Uri.parse(error.solutionUrl) ); } + + if (clicked === complainToMeText) { + this.editorGateway.editor.env.openExternal( + this.editorGateway.editor.Uri.parse(complainToMeLink) + ); + } }); } }); From 75adbda70ed70715fca402c22febe02eacc2bf92 Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Tue, 20 Sep 2022 18:58:00 -0500 Subject: [PATCH 2/6] Add the link to 'Complain to me' --- src/job/JobListener.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/job/JobListener.ts b/src/job/JobListener.ts index fc1098be..6f46b971 100644 --- a/src/job/JobListener.ts +++ b/src/job/JobListener.ts @@ -130,7 +130,8 @@ export default class JobListener { this.editorGateway.editor.window .showErrorMessage( `Restarting Docker Desktop should fix that error '${errorMessage}', though that's not fun`, - { detail: 'Possible solution' } + { detail: 'Possible solution' }, + complainToMeText ) .then((clicked) => { if (clicked === complainToMeText) { From c1820dd6c3f05fd6940cdf0fa8c3dbe8d71205ab Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Tue, 20 Sep 2022 19:26:13 -0500 Subject: [PATCH 3/6] Add a button to complain to me when a job fails --- src/job/JobListener.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/job/JobListener.ts b/src/job/JobListener.ts index 6f46b971..f237b061 100644 --- a/src/job/JobListener.ts +++ b/src/job/JobListener.ts @@ -208,12 +208,17 @@ export default class JobListener { } const showJobOutput = 'Show job log'; + const complainToMeText = 'Complain to me'; + const complainToMeLink = + 'mailto:ryan@getlocalci.com?subject=A job failed with Local Ci, and I do not know why&body=Hi Ryan, Could you help with this error I saw with a Local CI job: '; const dontShowAgain = `Don't show again`; + this.editorGateway.editor.window .showInformationMessage( `The job ${job?.getJobName()} ${didSucceed ? 'succeeded' : 'failed'}`, - showJobOutput, - dontShowAgain + ...(didSucceed + ? [showJobOutput, dontShowAgain] + : [showJobOutput, complainToMeText, dontShowAgain]) ) .then((clicked) => { if (clicked === showJobOutput) { @@ -223,6 +228,12 @@ export default class JobListener { if (clicked === dontShowAgain) { context.globalState.update(SUPPRESS_JOB_COMPLETE_MESSAGE, true); } + + if (clicked === complainToMeText) { + this.editorGateway.editor.env.openExternal( + this.editorGateway.editor.Uri.parse(complainToMeLink) + ); + } }); } } From 5f59a0ce7af7cf4ab91f54603e1fbd5c7a94545f Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Tue, 20 Sep 2022 19:35:05 -0500 Subject: [PATCH 4/6] Bump the binary version to the latest: v0.1.21194 --- node/binary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/binary.js b/node/binary.js index a5ef2976..d0253f42 100644 --- a/node/binary.js +++ b/node/binary.js @@ -3,7 +3,7 @@ const { Binary } = require('@cloudflare/binary-install'); const { type, arch } = require('os'); const path = require('path'); -const binaryVersion = '0.1.20788'; +const binaryVersion = '0.1.21194'; const intelMacBinaryVersion = '0.1.17087'; const supportedPlatforms = [ From 7fb343225be8e16b726a52b55c9a170c1a23c643 Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Tue, 20 Sep 2022 19:37:33 -0500 Subject: [PATCH 5/6] Bump the version to 1.9.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c5e7391a..fbceab64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "local-ci", - "version": "1.9.0", + "version": "1.9.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "local-ci", - "version": "1.9.0", + "version": "1.9.1", "hasInstallScript": true, "license": "GPL-2.0-or-later", "os": [ diff --git a/package.json b/package.json index 0668fd1f..82b3a650 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "local-ci", "displayName": "Local CI", "description": "Debug CircleCI® workflows locally, with Bash access during and after. Free preview, then paid.", - "version": "1.9.0", + "version": "1.9.1", "publisher": "LocalCI", "contributors": [ "Ryan Kienstra" From 32332a4cc35dde5cbfed0bf8be0d68cef59367fb Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Tue, 20 Sep 2022 19:40:15 -0500 Subject: [PATCH 6/6] Add a CHANGELOG entry for 1.9.1 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03f10516..087f0874 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 1.9.1 - 20 September 2022 +- Bump the binary version to the latest: v0.1.21194. [#189](https://github.com/getlocalci/local-ci/pull/189) +- Add a button to complain to me. [#188](https://github.com/getlocalci/local-ci/pull/188) + ## 1.9.0 - 18 September 2022 - Add shellcheck for scripts, add dependency injection. [#182](https://github.com/getlocalci/local-ci/pull/182)