Adding upstream version 3.10.8.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
37e9b6d587
commit
03bfe4079e
356 changed files with 28857 additions and 0 deletions
50
f3/project.go
Normal file
50
f3/project.go
Normal file
|
@ -0,0 +1,50 @@
|
|||
// Copyright Earl Warren <contact@earl-warren.org>
|
||||
// Copyright Loïc Dachary <loic@dachary.org>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package f3
|
||||
|
||||
type Project struct {
|
||||
Common
|
||||
Name string `json:"name"`
|
||||
IsPrivate bool `json:"is_private"`
|
||||
IsMirror bool `json:"is_mirror"`
|
||||
Description string `json:"description"`
|
||||
DefaultBranch string `json:"default_branch"`
|
||||
Forked *Reference `json:"forked"`
|
||||
HasWiki bool `json:"has_wiki"`
|
||||
Topics []*Reference `json:"topics"`
|
||||
}
|
||||
|
||||
func (o Project) Project(other Project) bool {
|
||||
return o.Common.Equal(other.Common) &&
|
||||
o.Name == other.Name &&
|
||||
o.IsPrivate == other.IsPrivate &&
|
||||
o.IsMirror == other.IsMirror &&
|
||||
o.Description == other.Description &&
|
||||
o.DefaultBranch == other.DefaultBranch &&
|
||||
nilOrEqual(o.Forked, other.Forked) &&
|
||||
o.HasWiki == other.HasWiki &&
|
||||
arrayEqual(o.Topics, other.Topics)
|
||||
}
|
||||
|
||||
func (o *Project) GetName() string {
|
||||
return o.Name
|
||||
}
|
||||
|
||||
func (o *Project) GetReferences() References {
|
||||
references := o.Common.GetReferences()
|
||||
if !o.Forked.IsNil() {
|
||||
references = append(references, o.Forked)
|
||||
}
|
||||
for _, topic := range o.Topics {
|
||||
references = append(references, topic)
|
||||
}
|
||||
return references
|
||||
}
|
||||
|
||||
func (o *Project) Clone() Interface {
|
||||
clone := &Project{}
|
||||
*clone = *o
|
||||
return clone
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue