Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

fix(api): link github push commits by their full hash (#3455)

Hampus123c4d5bbfd2
diff --git a/fluxer_api/src/api/webhook/transformers/GitHubCommitTransformer.ts b/fluxer_api/src/api/webhook/transformers/GitHubCommitTransformer.ts
index 38f08d180..c14511fb7 100644
--- a/fluxer_api/src/api/webhook/transformers/GitHubCommitTransformer.ts
+++ b/fluxer_api/src/api/webhook/transformers/GitHubCommitTransformer.ts
@@ -129,7 +129,7 @@ export async function transformPush(body: GitHubWebhook): Promise<RichEmbedReque
/This reverts commit (\w{40})\./g,
(_, hash) => `This reverts commit [\`${hash.substring(0, 7)}\`](${body.repository?.html_url}/commit/${hash}).`,
);
- return `[\`${shortCommitId}\`](${commit.url}) ${commitMessage} - ${commit.author.name}`;
+ return `[\`${shortCommitId}\`](${body.repository?.html_url}/commit/${commit.id}) ${commitMessage} - ${commit.author.name}`;
})
.join('\n');
if (!body.compare) {