Skip to content

Commit

Permalink
Update models/repo/release.go
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored Apr 7, 2023
1 parent 86298a6 commit 23b3612
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions models/repo/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,20 +335,6 @@ func (s releaseMetaSearch) Less(i, j int) bool {
return s.ID[i] < s.ID[j]
}

// InitReleaseRepo makes sure the Repo field of releases is not nil
func InitReleaseRepo(ctx context.Context, rels ...*Release) error {
var err error
for _, release := range rels {
if release.Repo == nil {
release.Repo, err = GetRepositoryByID(ctx, release.RepoID)
if err != nil {
return err
}
}
}
return err
}

// GetReleaseAttachments retrieves the attachments for releases
func GetReleaseAttachments(ctx context.Context, rels ...*Release) (err error) {
if len(rels) == 0 {
Expand Down

0 comments on commit 23b3612

Please sign in to comment.