Skip to content

Commit

Permalink
update logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gferraro committed Sep 26, 2024
1 parent dca92bb commit 7054b9f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/aggregate-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,17 @@ const versionsAreEqual = (prev, next) => {
};
const latestCommitDate = async (branch) => {
try {
console.log("Getting latest commit for ", branch);
console.log("Getting latest commit date for ", branch);
const response = await fetch(`https://api.github.com/repos/TheCacophonyProject/saltops/commits?sha=${branch}&per_page=1`);
if (!response.ok) {
throw new Error(`Response status: ${response.status}`);
}

const commitJson = await response.json();
const commitDate = commitJson[0]["commit"]["author"]["date"]
console.log(commitJson);
return commitDate
} catch (error) {
console.error(error.message);
console.error("Error getting latest commit date ",error.message);
}
return "";
}
Expand All @@ -95,7 +94,7 @@ const latestCommitDate = async (branch) => {
versionData[branch] = {};
process.chdir(`./${branch}`);
const commitDate = await latestCommitDate(branch)
console.log("got commit date",commitDate);
console.log("Got commit date",commitDate);
for (const model of models) {
// For each camera model:
process.chdir(`./${model}`);
Expand Down

0 comments on commit 7054b9f

Please sign in to comment.