summaryrefslogtreecommitdiffstats
path: root/models/repo_mirror.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-09-15 23:28:25 +0800
committerGitHub <noreply@github.com>2019-09-15 23:28:25 +0800
commit4959bf1c097917576472f9f66afa0fb615500c07 (patch)
tree9c2db8d5a91c1e6d97a1e66470347b647d01cfb0 /models/repo_mirror.go
parentbe0f7ff9bf6da5b1642a98ff02f313ba39ee4518 (diff)
downloadgitea-4959bf1c097917576472f9f66afa0fb615500c07.tar.gz
gitea-4959bf1c097917576472f9f66afa0fb615500c07.zip
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
Diffstat (limited to 'models/repo_mirror.go')
-rw-r--r--models/repo_mirror.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/repo_mirror.go b/models/repo_mirror.go
index 9801c05ae4..e1c1aefc39 100644
--- a/models/repo_mirror.go
+++ b/models/repo_mirror.go
@@ -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)