From 6f89b193fd7b53dec489741211dc548c3f026caa Mon Sep 17 00:00:00 2001 From: Matsuuu Date: Fri, 20 Mar 2026 12:42:31 +0200 Subject: [PATCH 1/2] ci: Prevent new version patches, if only content is ci changes --- ...ine-release-candidate-branch-for-track.mjs | 21 ++++++++++++++----- .github/scripts/github-helpers.mjs | 2 +- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/scripts/determine-release-candidate-branch-for-track.mjs b/.github/scripts/determine-release-candidate-branch-for-track.mjs index e903467931ef..4b095bf9a8b7 100644 --- a/.github/scripts/determine-release-candidate-branch-for-track.mjs +++ b/.github/scripts/determine-release-candidate-branch-for-track.mjs @@ -1,5 +1,4 @@ import { - countCommitsBetweenRefs, ensureEnvVar, listCommitsBetweenRefs, resolveRcBranchForTrack, @@ -25,12 +24,24 @@ function main() { console.log(`Commits between ${releaseCandidateBranch} and ${currentTag.tag}:`); console.log(listCommitsBetweenRefs(releaseCandidateBranch, currentTag.tag)); - const commitCount = countCommitsBetweenRefs(releaseCandidateBranch, currentTag.tag); + const commitList = listCommitsBetweenRefs(releaseCandidateBranch, currentTag.tag).split('\n'); + const actionableCommitList = filterActionableCommits(commitList); - writeGithubOutput({ + const output = { release_candidate_branch: releaseCandidateBranch, - should_update: commitCount > 0 ? 'true' : 'false', - }); + should_update: actionableCommitList.length > 0 ? 'true' : 'false', + }; + + console.log(output); + + writeGithubOutput(output); +} + +/** + * @param { string[] } commitList + * */ +export function filterActionableCommits(commitList) { + return commitList.filter((commit) => !commit.trimStart().startsWith('ci:')); } // only run when executed directly, not when imported by tests diff --git a/.github/scripts/github-helpers.mjs b/.github/scripts/github-helpers.mjs index 81f328b30e24..7a2d1f14a5d2 100644 --- a/.github/scripts/github-helpers.mjs +++ b/.github/scripts/github-helpers.mjs @@ -286,7 +286,7 @@ export function listTagsPointingAt(commit) { * @param {string} to */ export function listCommitsBetweenRefs(from, to) { - return sh('git', ['--no-pager', 'log', '--format="- %s (%h)', `${to}..origin/${from}`]); + return sh('git', ['--no-pager', 'log', '--format=%s (%h)', `${to}..origin/${from}`]); } /** From 61e51ca99d95f8a8c63bf418750d8992b302a117 Mon Sep 17 00:00:00 2001 From: Matsuuu Date: Fri, 20 Mar 2026 13:27:36 +0200 Subject: [PATCH 2/2] ci: Better parsing for commits --- .../scripts/determine-release-candidate-branch-for-track.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/determine-release-candidate-branch-for-track.mjs b/.github/scripts/determine-release-candidate-branch-for-track.mjs index 4b095bf9a8b7..4924b2d8297d 100644 --- a/.github/scripts/determine-release-candidate-branch-for-track.mjs +++ b/.github/scripts/determine-release-candidate-branch-for-track.mjs @@ -24,7 +24,9 @@ function main() { console.log(`Commits between ${releaseCandidateBranch} and ${currentTag.tag}:`); console.log(listCommitsBetweenRefs(releaseCandidateBranch, currentTag.tag)); - const commitList = listCommitsBetweenRefs(releaseCandidateBranch, currentTag.tag).split('\n'); + const commitList = listCommitsBetweenRefs(releaseCandidateBranch, currentTag.tag) + .split('\n') + .filter((commit) => commit.trim().length > 0); const actionableCommitList = filterActionableCommits(commitList); const output = {