From 573f26f65a6fb2e29d74792e476d7b28ec9e10b1 Mon Sep 17 00:00:00 2001 From: aliculPix4D Date: Fri, 27 Oct 2023 15:11:20 +0200 Subject: [PATCH] gchat: don't hardcode the GitHub hostname --- cogito/gchatsink.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogito/gchatsink.go b/cogito/gchatsink.go index fa3dcf5e..f40b7322 100644 --- a/cogito/gchatsink.go +++ b/cogito/gchatsink.go @@ -122,8 +122,8 @@ func gChatBuildSummaryText(gitRef string, state BuildState, src Source, env Envi fmt.Fprintf(&bld, "*state* %s\n", decorateState(state)) // An empty gitRef means that cogito has been configured as chat only. if gitRef != "" { - commitUrl := fmt.Sprintf("https://github.com/%s/%s/commit/%s", - src.Owner, src.Repo, gitRef) + commitUrl := fmt.Sprintf("https://%s/%s/%s/commit/%s", + src.GhHostname, src.Owner, src.Repo, gitRef) commit := fmt.Sprintf("<%s|%.10s> (repo: %s/%s)", commitUrl, gitRef, src.Owner, src.Repo) fmt.Fprintf(&bld, "*commit* %s\n", commit)