1
0
Fork 0

Adding upstream version 3.10.8.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-18 09:37:23 +02:00
parent 37e9b6d587
commit 03bfe4079e
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
356 changed files with 28857 additions and 0 deletions

50
f3/project.go Normal file
View 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
}