Skip to content

Commit

Permalink
gchat: don't hardcode the GitHub hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
aliculPix4D committed Oct 27, 2023
1 parent 8c4b188 commit 573f26f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cogito/gchatsink.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 573f26f

Please sign in to comment.