Skip to content

Commit

Permalink
Fix commits variable initialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
rtm516 authored Apr 14, 2024
1 parent d8d4acf commit bd32249
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bibliothek-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module.exports.insert = async (buildInfo) => {
}, { sort: { _id: -1 } })
const changes = []
const lastBuild = previousBuild && previousBuild.changes.length ? previousBuild.changes.slice(0, 1)[0].commit : 'HEAD^1'
const commits;
let commits = [];
try {
commits = gitlog({
repo: buildInfo.repositoryPath,
Expand All @@ -112,7 +112,6 @@ module.exports.insert = async (buildInfo) => {
} catch(error) {
// Likely failed due to forced push or incompatible base branches
// Build will have no history
commits = [];
}
commits.forEach(function (commit) {
changes.push({
Expand Down

0 comments on commit bd32249

Please sign in to comment.