fix(core): update

This commit is contained in:
2024-06-22 10:01:15 +02:00
parent 11cbe93b4b
commit af909047ae
3 changed files with 26 additions and 1 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartgit',
version: '3.0.3',
version: '3.0.4',
description: 'A smart wrapper for nodegit that simplifies Git operations in Node.js.'
}

View File

@ -172,4 +172,15 @@ export class GitRepo {
return diffs;
}
/**
* Get all commit messages
*/
public async getAllCommitMessages(): Promise<string[]> {
const commits = await plugins.isomorphicGit.log({
fs: this.smartgitRef.envDeps.fs,
dir: this.repoDir,
});
return commits.map(commit => commit.commit.message);
}
}