From ff1cf5800d5e03c6a298fd7e0c4cd4632f3a6244 Mon Sep 17 00:00:00 2001 From: Ryan Schumacher Date: Tue, 6 May 2025 14:54:47 -0500 Subject: [PATCH] fix: add support for .yaml files --- index.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index 906b8b7..1c66475 100644 --- a/index.js +++ b/index.js @@ -17,15 +17,18 @@ module.exports = (app) => { async function check(context) { const timeStart = new Date(); - const config = await context.config("dco.yml", { - require: { - members: true, - }, - allowRemediationCommits: { - individual: false, - thirdParty: false, - }, - }); + const defaultConfig = { + require: { + members: true, + }, + allowRemediationCommits: { + individual: false, + thirdParty: false, + }, + }; + + let config = await context.config("dco.yaml"); + if (!config) config = await context.config("dco.yml", defaultConfig); const requireForMembers = config.require.members; const allowRemediationCommits = config.allowRemediationCommits;