(pkg, n = 15)
| 331 | * Given a package name, this will get the latest N commits in the associated directory |
| 332 | */ |
| 333 | export function getLatestPackageCommits(pkg, n = 15) { |
| 334 | const commitLog = execSync( |
| 335 | `git rev-list HEAD --all --reverse --max-count=${n} --pretty=oneline -- "${packagesDir}/${pkg}"`, |
| 336 | { |
| 337 | encoding: 'utf-8', |
| 338 | } |
| 339 | ) |
| 340 | return commitLog |
| 341 | } |
| 342 | |
| 343 | /** |
| 344 | * Returns true if the current git working directory is clean |