From 1a5a31c6acc3d890ff45022ddb7f52c1e9cc9198 Mon Sep 17 00:00:00 2001 From: Oscar Dominguez Date: Mon, 5 Jul 2021 02:50:46 +0200 Subject: [PATCH] fix(script): ignore archived repositories --- script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/script.js b/script.js index 9b89659..6b7ffca 100644 --- a/script.js +++ b/script.js @@ -27,6 +27,11 @@ const isYamlFile = (fileName) => /\.ya?ml$/.test(fileName); * @param {string} [options.cache] Select which package manager you want to use for caching */ export async function script(octokit, repository, { cache = "npm" }) { + if (repository.archived) { + octokit.log.info(`${repository.html_url} is archived, ignoring.`); + return; + } + // Global variables used throughout the code const owner = repository.owner.login; const repo = repository.name;