blob: 1329631fd6cf77f1dcff774b1811b932c9a06dde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package models
type BugComponent string
const (
BugComponentVulnerabilities BugComponent = "Vulnerabilities"
BugComponentStabilization BugComponent = "Stabilization"
BugComponentKeywording BugComponent = "Keywording"
BugComponentGeneral BugComponent = ""
)
type Bug struct {
Id string `pg:",pk"`
Product string
Component string
Assignee string
Status string
Summary string
}
type PackageToBug struct {
Id string `pg:",pk"`
PackageAtom string
BugId string
}
type VersionToBug struct {
Id string `pg:",pk"`
VersionId string
BugId string
}
func (b *Bug) MatchesComponent(component BugComponent) bool {
if component != BugComponentGeneral {
return b.Component == string(component)
}
return b.Component != string(BugComponentVulnerabilities) &&
b.Component != string(BugComponentStabilization) &&
b.Component != string(BugComponentKeywording)
}
|