From bf77f12a5b15a8b9c844c19b719e8bdc5ce8a8e6 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 7 Feb 2023 23:44:28 +0000 Subject: [PATCH] chore(release): 1.3.5 [skip ci] --- CHANGELOG.md | 7 +++++++ dist/index.js | 30 +++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b8e3a6..d9abb75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.3.5](https://github.com/dxnter/lastfm-readme/compare/v1.3.4...v1.3.5) (2023-02-07) + + +### Bug Fixes + +* **debug:** add additional context to debug ([1e96588](https://github.com/dxnter/lastfm-readme/commit/1e9658833174034b8efc56615d49f9e21a40de53)) + ## [1.3.4](https://github.com/dxnter/lastfm-readme/compare/v1.3.3...v1.3.4) (2023-02-05) diff --git a/dist/index.js b/dist/index.js index cb40e8d..92c9062 100644 --- a/dist/index.js +++ b/dist/index.js @@ -21853,7 +21853,7 @@ class InvalidRowsError extends Error { * @returns The parsed and validated workflow input */ async function parseInput() { - core.info('Parsing workflow input...'); + core.debug('Validating input variables'); const input = { lastfm_api_key: core.getInput('LASTFM_API_KEY', { required: true }), lastfm_user: core.getInput('LASTFM_USER', { required: true }), @@ -21882,6 +21882,7 @@ async function parseInput() { if (!input.commit_message) { throw new InvalidInputError('The COMMIT_MESSAGE input cannot be empty.'); } + core.debug('Input validation complete\n'); core.setOutput('input_parsed', 'true'); return input; } @@ -21890,12 +21891,13 @@ async function parseInput() { async function getReadmeFile(input) { + core.debug('Connecting to GitHub API'); const octokit = github.getOctokit(input.gh_token); const { owner, repo } = input.repository; - core.info(`Getting README content from ${owner}/${repo}`); const readme = await octokit.rest.repos.getReadme({ owner, repo }); core.setOutput('readme_content', readme.data.content); core.setOutput('readme_hash', readme.data.sha); + core.debug(`Fetched README content from ${owner}/${repo}\n`); return { content: Buffer.from(readme.data.content, readme.data.encoding).toString('utf-8'), hash: readme.data.sha, @@ -21904,6 +21906,7 @@ async function getReadmeFile(input) { async function updateReadmeFile(input, fileHash, newContent) { const octokit = github.getOctokit(input.gh_token); const { owner, repo } = input.repository; + core.debug(`Updating README.md content for ${owner}/${repo}\n`); octokit.rest.repos.createOrUpdateFileContents({ owner, repo, @@ -21916,7 +21919,7 @@ async function updateReadmeFile(input, fileHash, newContent) { email: 'lastfm-readme@proton.me', }, }); - core.info(`Updated README.md contents for ${owner}/${repo}`); + core.info(`✅ README successfully updated with new charts`); } ;// CONCATENATED MODULE: ./src/lastfm/index.ts @@ -21988,6 +21991,7 @@ const SectionNameMap = { * @throws {@link InvalidPeriodError} if the time period is invalid for a section. */ function getSectionsFromReadme(sectionComment, readmeContent) { + core.debug(`Searching for ${sectionComment} sections in README`); const sections = {}; const sectionStack = []; const startPrefix = `