From 5fd646408862e7289295b5b10a7f03726f913536 Mon Sep 17 00:00:00 2001 From: Ashley Anderson Date: Wed, 8 Jan 2025 12:29:50 -0500 Subject: [PATCH] Add mechnism to ignore commits in release notes (#1330) * Add mechnism to ignore commits in release notes. Ignore 'e5b0a312ddb1d508b2d14b4c101b894f2a4c7356' because it was committed without a PR. * Use full hash, filter out at the right spot --- .github/release-notes.config.js | 7 +++++++ .github/release-notes.js | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/release-notes.config.js b/.github/release-notes.config.js index 455704397..e0b541aff 100644 --- a/.github/release-notes.config.js +++ b/.github/release-notes.config.js @@ -40,4 +40,11 @@ module.exports = { labels: [], }, ], + + /** + * Ignore specific commits that cause problems with the release notes workflow. + */ + ignoreCommits: [ + "e5b0a312ddb1d508b2d14b4c101b894f2a4c7356", // committed without PR + ], } diff --git a/.github/release-notes.js b/.github/release-notes.js index f19348a4a..9ea6cbab1 100644 --- a/.github/release-notes.js +++ b/.github/release-notes.js @@ -18,7 +18,7 @@ async function getCommitsSinceLastRelease(exec) { await exec.exec( 'git', - ['log', '--pretty=format:"%h"', `${LATEST_RELEASE}..${TARGET_BRANCH}`], + ['log', '--pretty=format:"%H"', `${LATEST_RELEASE}..${TARGET_BRANCH}`], { listeners: { stdout(data) { @@ -36,6 +36,7 @@ async function getCommitsSinceLastRelease(exec) { .flatMap(hash => hash.split('\n')) .filter(Boolean) .map(hash => hash.replaceAll('"', '')) + .filter(hash => !config.ignoreCommits.includes(hash)) } /**