MCPcopy Create free account
hub / github.com/gogs/gogs / ComposeMetas

Method ComposeMetas

internal/database/repo.go:461–484  ·  view source on GitHub ↗

ComposeMetas composes a map of metas for rendering SHA1 URL and external issue tracker URL.

()

Source from the content-addressed store, hash-verified

459
460// ComposeMetas composes a map of metas for rendering SHA1 URL and external issue tracker URL.
461func (r *Repository) ComposeMetas() map[string]string {
462 if r.ExternalMetas != nil {
463 return r.ExternalMetas
464 }
465
466 r.ExternalMetas = map[string]string{
467 "repoLink": r.Link(),
468 }
469
470 if r.EnableExternalTracker {
471 r.ExternalMetas["user"] = r.MustOwner().Name
472 r.ExternalMetas["repo"] = r.Name
473 r.ExternalMetas["format"] = r.ExternalTrackerFormat
474
475 switch r.ExternalTrackerStyle {
476 case markup.IssueNameStyleAlphanumeric:
477 r.ExternalMetas["style"] = markup.IssueNameStyleAlphanumeric
478 default:
479 r.ExternalMetas["style"] = markup.IssueNameStyleNumeric
480 }
481 }
482
483 return r.ExternalMetas
484}
485
486// DeleteWiki removes the actual and local copy of repository wiki.
487func (r *Repository) DeleteWiki() {

Callers 1

Implementers 2

Repositoryinternal/database/repo.go
mailerRepointernal/database/issue_mail.go

Calls 2

LinkMethod · 0.95
MustOwnerMethod · 0.95

Tested by 1