From 87f3c76aaf6065168ccd8f436588671bfdc36f88 Mon Sep 17 00:00:00 2001 From: ramaghanta Date: Mon, 2 Jun 2025 13:46:38 -0400 Subject: [PATCH 1/2] skip check published action for template repository and new repositories created from template --- package-lock.json | 4 ++-- package.json | 2 +- src/check-published/check-published.ts | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 896379d..5ed88cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@checkdigit/github-actions", - "version": "2.4.0", + "version": "2.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@checkdigit/github-actions", - "version": "2.4.0", + "version": "2.4.1", "license": "MIT", "dependencies": { "@actions/core": "^1.10.1", diff --git a/package.json b/package.json index f063ed9..7244f38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@checkdigit/github-actions", - "version": "2.4.0", + "version": "2.4.1", "description": " Provides supporting operations for github action builds.", "author": "Check Digit, LLC", "license": "MIT", diff --git a/src/check-published/check-published.ts b/src/check-published/check-published.ts index ed71f03..18d6e4b 100644 --- a/src/check-published/check-published.ts +++ b/src/check-published/check-published.ts @@ -43,6 +43,13 @@ export default async function (): Promise { log(`Main package.json - name ${mainPackageJson.name} - version ${mainPackageJson.version}`); + if (mainPackageJson.name.includes('template')) { + log( + `Action skipped - package name includes "template" and so it's either a template or a new service/library created from a template.`, + ); + return; + } + // run npm show to get the latest version published let latestVersion: string; try { From 54e89923bf76728d7d615ef81176cd192dfeca92 Mon Sep 17 00:00:00 2001 From: ramaghanta Date: Mon, 2 Jun 2025 15:31:59 -0400 Subject: [PATCH 2/2] co-pilot made me do this --- src/check-published/check-published.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/check-published/check-published.ts b/src/check-published/check-published.ts index 18d6e4b..8487b9e 100644 --- a/src/check-published/check-published.ts +++ b/src/check-published/check-published.ts @@ -43,7 +43,7 @@ export default async function (): Promise { log(`Main package.json - name ${mainPackageJson.name} - version ${mainPackageJson.version}`); - if (mainPackageJson.name.includes('template')) { + if (mainPackageJson.name.toLowerCase().includes('template')) { log( `Action skipped - package name includes "template" and so it's either a template or a new service/library created from a template.`, );