Skip to content

Commit

Permalink
fix: make commit range work
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 committed Oct 1, 2024
1 parent 7945a5d commit d6de93b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/changelog/read_commits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ type RangeOption =

const readLog = (option: RangeOption) => (format: string) => {
const range = Object.entries(option)
.map(([k, v]) => `--${k}=${typeof v === "string" ? v : v.toISOString()}`)
.map(([k, v]) => `--${k}=${JSON.stringify(typeof v === "string" ? v : v.toISOString())}`)
.join(" ")

return $`git log ${range} --oneline --pretty=format:${format}`.lines()
return $.raw`git log ${range} --oneline --pretty=format:${format}`.lines()
}

export type Commit = {
Expand Down

0 comments on commit d6de93b

Please sign in to comment.