Skip to content

Commit

Permalink
Add mechnism to ignore commits in release notes (#1330)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
aganders3 authored Jan 8, 2025
1 parent b3072d5 commit 5fd6464
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/release-notes.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,11 @@ module.exports = {
labels: [],
},
],

/**
* Ignore specific commits that cause problems with the release notes workflow.
*/
ignoreCommits: [
"e5b0a312ddb1d508b2d14b4c101b894f2a4c7356", // committed without PR
],
}
3 changes: 2 additions & 1 deletion .github/release-notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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))
}

/**
Expand Down

0 comments on commit 5fd6464

Please sign in to comment.