Skip to content

Commit 25efc42

Browse files
authored
fix(script): ignore archived repositories (#8)
1 parent 82bcb79 commit 25efc42

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

script.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ const isYamlFile = (fileName) => /\.ya?ml$/.test(fileName);
2727
* @param {string} [options.cache] Select which package manager you want to use for caching
2828
*/
2929
export async function script(octokit, repository, { cache = "npm" }) {
30+
if (repository.archived) {
31+
octokit.log.info(`${repository.html_url} is archived, ignoring.`);
32+
return;
33+
}
34+
3035
// Global variables used throughout the code
3136
const owner = repository.owner.login;
3237
const repo = repository.name;

0 commit comments

Comments
 (0)