mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-10 23:52:16 +01:00
fix: f3: label color must start with #
This commit is contained in:
parent
63204e8edf
commit
604c21ffd7
1 changed files with 3 additions and 2 deletions
|
@ -7,6 +7,7 @@ package driver
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"code.gitea.io/gitea/models/db"
|
"code.gitea.io/gitea/models/db"
|
||||||
issues_model "code.gitea.io/gitea/models/issues"
|
issues_model "code.gitea.io/gitea/models/issues"
|
||||||
|
@ -45,7 +46,7 @@ func (o *label) ToFormat() f3.Interface {
|
||||||
return &f3.Label{
|
return &f3.Label{
|
||||||
Common: f3.NewCommon(fmt.Sprintf("%d", o.forgejoLabel.ID)),
|
Common: f3.NewCommon(fmt.Sprintf("%d", o.forgejoLabel.ID)),
|
||||||
Name: o.forgejoLabel.Name,
|
Name: o.forgejoLabel.Name,
|
||||||
Color: o.forgejoLabel.Color,
|
Color: strings.TrimPrefix(o.forgejoLabel.Color, "#"),
|
||||||
Description: o.forgejoLabel.Description,
|
Description: o.forgejoLabel.Description,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,7 +57,7 @@ func (o *label) FromFormat(content f3.Interface) {
|
||||||
ID: f3_util.ParseInt(label.GetID()),
|
ID: f3_util.ParseInt(label.GetID()),
|
||||||
Name: label.Name,
|
Name: label.Name,
|
||||||
Description: label.Description,
|
Description: label.Description,
|
||||||
Color: label.Color,
|
Color: "#" + label.Color,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue