Skip to content

Commit

Permalink
Merge pull request #165 from Zechiax/feature/sourceCodeLink
Browse files Browse the repository at this point in the history
Add Source URL to update embed
  • Loading branch information
Zechiax authored Oct 24, 2024
2 parents 98b6d9d + 72c7e9b commit 724ed02
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Asterion/EmbedBuilders/ModrinthEmbedBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,14 @@ private static EmbedBuilder GetFullVersionUpdateEmbed(Project project, Version v
{
Name = "Links",
Value = string.Join(" | ",
new[] {
$"[Changelog]({project.Url}/changelog)",
$"[Version Info]({project.GetVersionUrl(version)})")
$"[Version Info]({project.GetVersionUrl(version)})",
project.SourceUrl is not null
? $"[Source]({project.SourceUrl})"
: null
}.Where(x => !string.IsNullOrEmpty(x))
)
}
},
Timestamp = version.DatePublished,
Expand Down

0 comments on commit 724ed02

Please sign in to comment.