Skip to content

Commit

Permalink
vx: Log changes between two commits
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Apr 3, 2024
1 parent 2940662 commit 09372a4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions vx/scripts/release/github/listAllChangesSinceStableBranch.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const exec = require('child_process').execSync;

const IGNORE_PATTERN = require('./commitIgnorePattern');

const logger = require('vx/logger');
const { STABLE_BRANCH, CURRENT_BRANCH } = require('vx/util/taggedBranch');

/**
Expand All @@ -14,7 +15,12 @@ function listAllChangesSinceStableBranch() {
exec(`git fetch origin ${STABLE_BRANCH}`);

const output = exec(
`git log origin/${STABLE_BRANCH}..origin/${CURRENT_BRANCH} --name-only --pretty='format:%h %s (%an)'`
`git log origin/${STABLE_BRANCH}..origin/${CURRENT_BRANCH} --name-only --pretty='format:%h %s (%an)'`,
);

logger.log(
`All changes between origin/${STABLE_BRANCH}..origin/${CURRENT_BRANCH}: `,
output.toString(),
);

return output
Expand All @@ -24,7 +30,7 @@ function listAllChangesSinceStableBranch() {
commit =>
commit
.split('\n') // split each line of each commit
.filter(Boolean) // ignore empty lines
.filter(Boolean), // ignore empty lines
)
.filter(([title]) => !title?.match(IGNORE_PATTERN) ?? false) // ignore excluded terms
.map(([title, ...files]) => ({
Expand Down

0 comments on commit 09372a4

Please sign in to comment.