Skip to content

Commit

Permalink
last modified: less logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ooloth committed Dec 23, 2024
1 parent 2b99775 commit 931f005
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/remark/last-modified.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import { resolve } from 'path'

function remarkModifiedTime() {
return function (tree, file) {

Check failure on line 7 in lib/remark/last-modified.ts

View workflow job for this annotation

GitHub Actions / Format, lint and check types

Parameter 'tree' implicitly has an 'any' type.

Check failure on line 7 in lib/remark/last-modified.ts

View workflow job for this annotation

GitHub Actions / Format, lint and check types

Parameter 'file' implicitly has an 'any' type.
console.log('file:', file)
// console.log('file:', file)
const filepath = file.history[0]
console.log('filepath:', filepath)

// FIXME: the filepath might not be correctly set in the production environment. This could be due to differences in how file paths are handled or how the file.history array is populated.

if (!filepath) {
// NOTE: we'll get here when building the RSS feed, which is totally fine
console.error('Error: filepath is undefined')
return
}
Expand All @@ -23,7 +24,7 @@ function remarkModifiedTime() {

// Get the root directory of the repository
const repoRoot = execSync('git rev-parse --show-toplevel').toString().trim()
console.log('repoRoot:', repoRoot)
// console.log('repoRoot:', repoRoot)

// Get the relative path of the file from the repository root
const relativeFilePath = absoluteFilePath.replace(`${repoRoot}/`, '')
Expand All @@ -35,7 +36,7 @@ function remarkModifiedTime() {
.trim()
.split('\n')
.find(submodule => relativeFilePath.startsWith(submodule))
console.log('submodulePath:', submodulePath)
// console.log('submodulePath:', submodulePath)

let result
if (submodulePath) {
Expand Down

0 comments on commit 931f005

Please sign in to comment.