forked from hswaw/hscloud
hackdoc: link to cs instead of gitweb
Change-Id: Ifca7a63517bceffe7ccc0452474d9d16626486de
This commit is contained in:
parent
81262ff202
commit
bc0d3cb227
4 changed files with 3 additions and 9 deletions
|
@ -1,6 +0,0 @@
|
|||
Warsaw Hackerspace Kubernetes Cluster
|
||||
=====================================
|
||||
|
||||
**User documentation**: [user.md](user.md).
|
||||
|
||||
**Admin documentation**: [admin.md](admin.md).
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue