Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add push to remote mirror repository #15157

Merged
merged 73 commits into from
Jun 14, 2021
Merged

Conversation

KN4CK3R
Copy link
Member

@KN4CK3R KN4CK3R commented Mar 25, 2021

Adds the ability to push-mirror a repository to a remote destination.

ToDo:

grafik

close #3480
maybe #2280

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 25, 2021
@natto1784
Copy link

waiting for this very eagerly

models/repo_pushmirror.go Outdated Show resolved Hide resolved
models/repo_pushmirror.go Outdated Show resolved Hide resolved
@6543
Copy link
Member

6543 commented Jun 11, 2021

@KN4CK3R Error in Task: Update Mirrors: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/ ?) <= ?) AND (interval != 0)' at line 1

// PushMirrorsIterate iterates all push-mirror repositories.
func PushMirrorsIterate(f func(idx int, bean interface{}) error) error {
return x.
Where("last_update + (interval / ?) <= ?", time.Second, time.Now().Unix()).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should use xorm.Builder so xorm take care of different sql dialects

@lunny
Copy link
Member

lunny commented Jun 14, 2021

Please resolve the conflict.

models/migrations/v182.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 14, 2021
models/repo_pushmirror.go Outdated Show resolved Hide resolved
@6543
Copy link
Member

6543 commented Jun 14, 2021

@lunny done

@6543 6543 requested a review from kdumontnu June 14, 2021 13:46
@6543 6543 merged commit 440039c into go-gitea:main Jun 14, 2021
@KN4CK3R KN4CK3R deleted the feature-push-mirror branch June 15, 2021 06:16
@ayushmnnit
Copy link

Hi, Can I create a link from existing Gitea repo to remote Github repo and do pull/push based on certain interval using this feature?

@6543
Copy link
Member

6543 commented Jul 7, 2021

To push avterwards ... if you have more questions ask us on discord @ayushmnnit

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 7, 2021
@lafriks lafriks added the type/changelog Adds the changelog for a new Gitea version label Jul 16, 2021
@delvh delvh removed the type/changelog Adds the changelog for a new Gitea version label Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to automatically push to remote mirror repository
10 participants