Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
countCommitsBetweenRefs,
ensureEnvVar,
listCommitsBetweenRefs,
resolveRcBranchForTrack,
Expand All @@ -25,12 +24,26 @@ 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')
.filter((commit) => commit.trim().length > 0);
Comment thread
Matsuuu marked this conversation as resolved.
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:'));
Comment thread
Matsuuu marked this conversation as resolved.
}

// only run when executed directly, not when imported by tests
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/github-helpers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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}`]);
}

/**
Expand Down
Loading