1
0
Fork 0

hackdoc: link to cs instead of gitweb

Change-Id: Ifca7a63517bceffe7ccc0452474d9d16626486de
master
q3k 2021-03-06 20:49:00 +00:00
parent 81262ff202
commit bc0d3cb227
4 changed files with 3 additions and 9 deletions

View File

@ -1,6 +0,0 @@
Warsaw Hackerspace Kubernetes Cluster
=====================================
**User documentation**: [user.md](user.md).
**Admin documentation**: [admin.md](admin.md).

View File

@ -3,7 +3,7 @@ package source
import "context"
var (
FlagGitwebURLPattern = "https://gerrit.hackerspace.pl/plugins/gitiles/hscloud/+/%s/%s"
FlagGitwebURLPattern = "https://cs.hackerspace.pl/hscloud@%s/-/blob/%s"
)
type Source interface {

View File

@ -113,7 +113,7 @@ func (s *depotViewSource) ReadFile(ctx context.Context, path string) ([]byte, er
func (s *depotViewSource) WebLinks(fpath string) []WebLink {
gitURL := fmt.Sprintf(FlagGitwebURLPattern, s.hash, fpath)
links := []WebLink{
WebLink{Kind: "gitweb", LinkLabel: s.hash[:16], LinkURL: gitURL},
WebLink{Kind: "source", LinkLabel: s.hash[:16], LinkURL: gitURL},
}
if s.change != 0 {

View File

@ -72,6 +72,6 @@ func (s *LocalSource) IsDirectory(ctx context.Context, path string) (bool, error
func (s *LocalSource) WebLinks(fpath string) []WebLink {
gitURL := fmt.Sprintf(FlagGitwebURLPattern, "master", fpath)
return []WebLink{
WebLink{Kind: "gitweb", LinkLabel: "master", LinkURL: gitURL},
WebLink{Kind: "source", LinkLabel: "master", LinkURL: gitURL},
}
}