From 94a2491dbb74fd3db4f2c6e77021209a54962e59 Mon Sep 17 00:00:00 2001 From: Michael Fix Date: Tue, 2 Feb 2021 17:52:18 -0800 Subject: [PATCH] remove sponsor labels config requirement (#99) --- src/thread/opened.js | 8 ++++---- test/index.test.js | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/thread/opened.js b/src/thread/opened.js index d90660a..c9e3614 100644 --- a/src/thread/opened.js +++ b/src/thread/opened.js @@ -51,11 +51,11 @@ async function checkIfSponsor(context, after) { module.exports = () => async (context) => { const config = await getConfig(context) - if (!Array.isArray(config.sponsor_labels)) { - return - } + // if (!Array.isArray(config.sponsor_labels)) { + // return + // } if (await checkIfSponsor(context)) { - addLabels(context.octokit, context.issue({ labels: config.sponsor_labels })) + addLabels(context.octokit, context.issue({ labels: config.sponsor_labels || ['sponsor'] })) } } diff --git a/test/index.test.js b/test/index.test.js index ba5208a..a6a33b5 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -164,9 +164,6 @@ commits: labels: - author -sponsor_labels: - - sponsor - default: close: delay: 1ms