From 1deb19da9430ab3030974fd96d7972fce1c83278 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sun, 5 Sep 2021 11:06:45 -0700 Subject: [PATCH] feat(logging): add logging for determining current and previous tag --- action.yml | 1 + src/main.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/action.yml b/action.yml index 8b472af..0466240 100644 --- a/action.yml +++ b/action.yml @@ -22,6 +22,7 @@ inputs: skip-prereleases: required: false description: If enabled, when a new non-prerelease tag is pushed, the changelog will be created between the pushed tag, and the last non-prerelease tag + default: 'false' runs: using: 'node12' main: 'dist/main.js' diff --git a/src/main.ts b/src/main.ts index 88f2d13..3108b2c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -51,6 +51,7 @@ const searchForPreviousReleaseTag = async ( `The the current tag "${currentReleaseTag}" does not appear to conform to semantic versioning.`, ); } + core.info(`Valid semver tag found: ${validSemver}`) const listTagsOptions = client.rest.repos.listTags.endpoint.merge({ ...tagInfo, @@ -70,6 +71,7 @@ const searchForPreviousReleaseTag = async ( .filter((tag) => tag.semverTag !== null) .sort((a, b) => semverRcompare(a.semverTag!, b.semverTag!)) as ExtendedTag[]; + core.info(`Finding previous tag from list: ${JSON.stringify(tagList)}`) let previousReleaseTag = null; for (const tag of tagList) { if (semverLt(tag.semverTag, currentReleaseTag) && (!skipPreReleases || semverDiff(tag.semverTag, currentReleaseTag) !== "prerelease")) { @@ -77,6 +79,7 @@ const searchForPreviousReleaseTag = async ( break; } } + core.info(`Previous tag to find commits between: ${previousReleaseTag}`) return previousReleaseTag; };