Move create release from models to a standalone package (#7539)

* move create release from models to a standalone package

* fix lint

* fix comment year

* fix lint

* fix lint

* fix package import name

* fix vendor

* fix go mod

* some refactors

* fix vendor

* use go1.12 make vendor

* fix vendor
This commit is contained in:
Lunny Xiao 2019-09-15 23:28:25 +08:00 committed by GitHub
parent be0f7ff9bf
commit 4959bf1c09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 191 additions and 147 deletions

View file

@ -318,6 +318,12 @@ func (m *Mirror) runSync() ([]*mirrorSyncResult, bool) {
return parseRemoteUpdateOutput(output), true
}
// RunMirrorSync will invoke Mirror's runSync
func RunMirrorSync(mirror *Mirror) bool {
_, ok := mirror.runSync()
return ok
}
func getMirrorByRepoID(e Engine, repoID int64) (*Mirror, error) {
m := &Mirror{RepoID: repoID}
has, err := e.Get(m)