Skip to content

Commit

Permalink
chore: fix weirdness
Browse files Browse the repository at this point in the history
Signed-off-by: IThundxr <[email protected]>
  • Loading branch information
IThundxr committed Aug 6, 2023
1 parent 0ec1fb4 commit 9fb0eea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/webserver/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,16 @@ const generateCommitsString = (head_sha: string) => {
.map((commit) => {
const committer = commit.committer;
const userProfile = `https://github.com/${committer.username}`;
return `[➤](${commit.url}) ${commit.message} - [${committer.username}](${userProfile})`;
const messageWithoutHashtag = commit.message.replace(/#/g, ''); // Remove all '#' symbols
return `[➤](${commit.url}) ${messageWithoutHashtag} - [${committer.username}](${userProfile})`;
})
.join('\n');

if (commitString.length > 3072) {
const url = `https://github.com/Layers-of-Railways/Railway/commits/${head_sha}`;
return `Commits are too long to display please check [here](${url})`;
}

return commitString;
};

Expand Down

0 comments on commit 9fb0eea

Please sign in to comment.