This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow-checks-action.git

commit e2a613e40518718a3931ef93279850a75fe4aa66
Author: Louis Brunner <[email protected]>
AuthorDate: Mon Sep 7 17:49:49 2020 +0100

    Don't add a title when updating a check
---
 dist/index.js | 2 +-
 src/checks.ts | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dist/index.js b/dist/index.js
index 08d880d..0c5f986 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1 +1 @@
-module.exports=(()=>{var __webpack_modules__={321:function(e,t,r){"use 
strict";var 
s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return
 t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var 
o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var
 n=this&&this.__importStar||function(e [...]
\ No newline at end of file
+module.exports=(()=>{var __webpack_modules__={321:function(e,t,r){"use 
strict";var 
s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return
 t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var 
o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var
 n=this&&this.__importStar||function(e [...]
\ No newline at end of file
diff --git a/src/checks.ts b/src/checks.ts
index 807d072..d90ee7c 100644
--- a/src/checks.ts
+++ b/src/checks.ts
@@ -11,11 +11,11 @@ type CreateOptions = {
   completed: boolean;
 };
 
-const unpackInputs = (inputs: Inputs.Args): Record<string, unknown> => {
+const unpackInputs = (inputs: Inputs.Args, options: {update: boolean} = 
{update: false}): Record<string, unknown> => {
   let output;
   if (inputs.output) {
     output = {
-      title: inputs.name,
+      title: options.update ? undefined : inputs.name,
       summary: inputs.output.summary,
       text: inputs.output.text_description,
       actions: inputs.actions,
@@ -91,6 +91,6 @@ export const updateRun = async (
     ...ownership,
     check_run_id: id,
     completed_at: formatDate(),
-    ...unpackInputs(inputs),
+    ...unpackInputs(inputs, {update: true}),
   });
 };

Reply via email to