Skip to content

Commit 1c9532e

Browse files
committed
Trim whitespaces from changelog messages
1 parent 8c08ddd commit 1c9532e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pages/changelog.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default function Changelog({ location, commits }: { location: string } &
4040
<h2 className="text-3xl font-bold pb-2">
4141
Commits
4242
</h2>
43+
4344
{commits.map((commit, i, arr) => <Commit key={commit.hash} commit={commit} prev={arr[i - 1]} />)}
4445

4546
</Main>
@@ -85,7 +86,7 @@ export async function getStaticProps(context: GetStaticPropsContext): Promise<Ge
8586
return {
8687
hash: commit.sha,
8788
timestamp: new Date(commit.commit.committer.date).getTime(),
88-
message: commit.commit.message,
89+
message: commit.commit.message.split("\n")[0].trim(),
8990
type: "Bot/Data"
9091
}
9192
})
@@ -106,7 +107,7 @@ export async function getStaticProps(context: GetStaticPropsContext): Promise<Ge
106107
return {
107108
hash,
108109
timestamp,
109-
message: split.join("|"),
110+
message: split.join("|").split("\n")[0].trim(),
110111
type: "Website"
111112
}
112113
})

0 commit comments

Comments
 (0)