mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-02 16:35:19 +02:00
Support alphanumeric issue style (ABC-1234) for external issue tracker (#2992)
This commit is contained in:
parent
39356f4238
commit
ba314a7a36
8 changed files with 353 additions and 12 deletions
|
@ -170,6 +170,7 @@ type Repository struct {
|
|||
EnableIssues bool `xorm:"NOT NULL DEFAULT true"`
|
||||
EnableExternalTracker bool
|
||||
ExternalTrackerFormat string
|
||||
ExternalTrackerStyle string
|
||||
ExternalMetas map[string]string `xorm:"-"`
|
||||
EnablePulls bool `xorm:"NOT NULL DEFAULT true"`
|
||||
|
||||
|
@ -254,6 +255,13 @@ func (repo *Repository) ComposeMetas() map[string]string {
|
|||
"user": repo.MustOwner().Name,
|
||||
"repo": repo.Name,
|
||||
}
|
||||
switch repo.ExternalTrackerStyle {
|
||||
case markdown.ISSUE_NAME_STYLE_ALPHANUMERIC:
|
||||
repo.ExternalMetas["style"] = markdown.ISSUE_NAME_STYLE_ALPHANUMERIC
|
||||
default:
|
||||
repo.ExternalMetas["style"] = markdown.ISSUE_NAME_STYLE_NUMERIC
|
||||
}
|
||||
|
||||
}
|
||||
return repo.ExternalMetas
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue