From ceeff1fdefbe6685b3f2700e94c5acf0ea84e537 Mon Sep 17 00:00:00 2001 From: Jackson Kearl Date: Thu, 18 Nov 2021 10:25:56 -0800 Subject: [PATCH] Allow no secret --- classifier-deep/apply/apply-labels/index.js | 4 ++-- classifier-deep/apply/apply-labels/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/classifier-deep/apply/apply-labels/index.js b/classifier-deep/apply/apply-labels/index.js index db36e64..5c84bb6 100644 --- a/classifier-deep/apply/apply-labels/index.js +++ b/classifier-deep/apply/apply-labels/index.js @@ -25,9 +25,9 @@ class ApplyLabels extends Action_1.Action { async onTriggered(github) { var _a; let manifest = Promise.resolve(undefined); - if (manifestURL && manifestSecret) { + if (manifestURL) { manifest = node_fetch_1.default(manifestURL, { - headers: { 'x-triager-manifest-secret': manifestSecret }, + headers: manifestSecret ? { 'x-triager-manifest-secret': manifestSecret } : {}, }).then((v) => v.json(), (e) => { utils_1.safeLog('error loading triager manifest', e.message); return undefined; diff --git a/classifier-deep/apply/apply-labels/index.ts b/classifier-deep/apply/apply-labels/index.ts index aaff2c7..8d718ff 100644 --- a/classifier-deep/apply/apply-labels/index.ts +++ b/classifier-deep/apply/apply-labels/index.ts @@ -37,9 +37,9 @@ class ApplyLabels extends Action { async onTriggered(github: OctoKit) { let manifest: Promise = Promise.resolve(undefined) - if (manifestURL && manifestSecret) { + if (manifestURL) { manifest = fetch(manifestURL, { - headers: { 'x-triager-manifest-secret': manifestSecret }, + headers: manifestSecret ? { 'x-triager-manifest-secret': manifestSecret } : {}, }).then( (v) => v.json() as Promise, (e) => {