From d119287d22dee5d017e4a29d53edf464d23964c7 Mon Sep 17 00:00:00 2001 From: Bao Zhiyuan Date: Wed, 23 Oct 2024 18:15:49 +0800 Subject: [PATCH] fix fix date --- src/build.mts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/build.mts b/src/build.mts index 6ac1d57..27581ad 100644 --- a/src/build.mts +++ b/src/build.mts @@ -80,9 +80,8 @@ function getPrNumber(teamName: string): number { const commit = $`git log --format=%H teams/${teamName}/${latestFile}`.split( '\n', )[0] - const oldestMergeCommit = $`git rev-list --merges ${commit}^..HEAD`.split( - '\n', - )[0] + const oldestMergeCommit = + $`git rev-list --reverse --merges ${commit}^..HEAD`.split('\n')[0] const mergeCommitMessage = $`git log --format=%B -n 1 ${oldestMergeCommit}` const title = mergeCommitMessage.split('\n')[0] const prNumber = title.match(/Merge pull request #(\d+)/)?.[1]