forked from hswaw/hscloud
hackdoc: link to cs instead of gitweb
Change-Id: Ifca7a63517bceffe7ccc0452474d9d16626486demaster
parent
81262ff202
commit
bc0d3cb227
|
@ -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"
|
import "context"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
FlagGitwebURLPattern = "https://gerrit.hackerspace.pl/plugins/gitiles/hscloud/+/%s/%s"
|
FlagGitwebURLPattern = "https://cs.hackerspace.pl/hscloud@%s/-/blob/%s"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Source interface {
|
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 {
|
func (s *depotViewSource) WebLinks(fpath string) []WebLink {
|
||||||
gitURL := fmt.Sprintf(FlagGitwebURLPattern, s.hash, fpath)
|
gitURL := fmt.Sprintf(FlagGitwebURLPattern, s.hash, fpath)
|
||||||
links := []WebLink{
|
links := []WebLink{
|
||||||
WebLink{Kind: "gitweb", LinkLabel: s.hash[:16], LinkURL: gitURL},
|
WebLink{Kind: "source", LinkLabel: s.hash[:16], LinkURL: gitURL},
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.change != 0 {
|
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 {
|
func (s *LocalSource) WebLinks(fpath string) []WebLink {
|
||||||
gitURL := fmt.Sprintf(FlagGitwebURLPattern, "master", fpath)
|
gitURL := fmt.Sprintf(FlagGitwebURLPattern, "master", fpath)
|
||||||
return []WebLink{
|
return []WebLink{
|
||||||
WebLink{Kind: "gitweb", LinkLabel: "master", LinkURL: gitURL},
|
WebLink{Kind: "source", LinkLabel: "master", LinkURL: gitURL},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue