From cb1bba87d5411b695353c354020e37cb2236157e Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Tue, 8 Feb 2022 03:23:39 +0100 Subject: [PATCH] fix(templates/markdown): support `repository` (#850) [skip ci] --- source/app/metrics/metadata.mjs | 4 ++-- source/templates/markdown/metadata.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/app/metrics/metadata.mjs b/source/app/metrics/metadata.mjs index 5a4b429a..18f024fb 100644 --- a/source/app/metrics/metadata.mjs +++ b/source/app/metrics/metadata.mjs @@ -505,11 +505,11 @@ metadata.template = async function({__templates, name, plugins}) { if (account !== "bypass") { const context = q.repo ? "repository" : account if ((Array.isArray(this.supports)) && (!this.supports.includes(context))) - throw new Error(`not supported for: ${context}`) + throw new Error(`template not supported for: ${context}`) } //Format check if ((format) && (Array.isArray(this.formats)) && (!this.formats.includes(format))) - throw new Error(`not supported for: ${format}`) + throw new Error(`template not supported for: ${format}`) }, } } diff --git a/source/templates/markdown/metadata.yml b/source/templates/markdown/metadata.yml index 68d4125d..56ca2848 100644 --- a/source/templates/markdown/metadata.yml +++ b/source/templates/markdown/metadata.yml @@ -6,6 +6,7 @@ index: 3 supports: - user - organization + - repository formats: - markdown - markdown-pdf