Skip to content

Commit

Permalink
refactor:add filePath to console
Browse files Browse the repository at this point in the history
  • Loading branch information
huseyingulec committed Nov 22, 2023
1 parent 257e2bf commit 633ea3a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,7 @@ async function main() {

// Get the date of the last commit for the translated file
const translatedFileLastCommitDate = await getLastCommitDate(owner, repo, translatedFilePath);
const originalFileLastCommitDate = await getLastCommitDate(owner, repo, originalFilePath);

console.log(`Last commit date for ${originalFilePath}: ${originalFileLastCommitDate}`);
const originalFileLastCommitDate = await getLastCommitDate(originalOwner, originalRepo, originalFilePath);

// Get the list of commits for the original file
const { data: originalFileCommits } = await octokit.repos.listCommits({
Expand All @@ -222,6 +220,10 @@ async function main() {

// If there are new commits
if (newCommits.length > 0) {

// Log the date of the last commit for the translated file
console.log(`Last commit date for ${translatedFilePath}: ${originalFileLastCommitDate}`);

console.log(`-Found ${newCommits.length} new commits for ${file}`);

// Create an issue
Expand Down

0 comments on commit 633ea3a

Please sign in to comment.