4
0
Fork 2
mirror of https://gerrit.hackerspace.pl/hscloud synced 2025-02-18 23:16:44 +00:00

Merge "hackdoc: link to cs instead of gitweb"

This commit is contained in:
q3k 2021-03-06 22:17:34 +00:00 committed by Gerrit Code Review
commit 7dda1b51ce
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},
}
}