mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
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:
parent
be0f7ff9bf
commit
4959bf1c09
6 changed files with 191 additions and 147 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue