From eb4b427c01b0625ea804cee4d742caca59b5cd8b Mon Sep 17 00:00:00 2001 From: Ashley Anderson Date: Tue, 7 Jan 2025 12:17:34 -0500 Subject: [PATCH 1/2] Add mechnism to ignore commits in release notes. Ignore 'e5b0a312ddb1d508b2d14b4c101b894f2a4c7356' because it was committed without a PR. --- .github/release-notes.config.js | 7 +++++++ .github/release-notes.js | 2 +- 2 files changed, 8 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..e1730df9c 100644 --- a/.github/release-notes.js +++ b/.github/release-notes.js @@ -24,7 +24,7 @@ async function getCommitsSinceLastRelease(exec) { stdout(data) { const hash = data.toString() - if (hash) { + if (hash && !config.ignoreCommits.includes(hash)) { hashes.push(hash) } }, From ebeadc664fd3523d89d9103946a6fd54586ea7a1 Mon Sep 17 00:00:00 2001 From: Ashley Anderson Date: Tue, 7 Jan 2025 12:29:30 -0500 Subject: [PATCH 2/2] Use full hash, filter out at the right spot --- .github/release-notes.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/release-notes.js b/.github/release-notes.js index e1730df9c..9ea6cbab1 100644 --- a/.github/release-notes.js +++ b/.github/release-notes.js @@ -18,13 +18,13 @@ 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) { const hash = data.toString() - if (hash && !config.ignoreCommits.includes(hash)) { + if (hash) { hashes.push(hash) } }, @@ -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)) } /**