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

Select branch to fetch / remove unreachable commits in rake task / add support for gitea webhook #23

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

flozzone
Copy link

Hi, as we switched over to the redmine_git_mirror plugin, I did some adaptions to the plugin, to better fit our environment.
I would like to share this with you, because I think others would need the features too.

Each feature or change is described in its commit message.

What do you think about my proposed changes?

Fixes #10, #11

@flozzone flozzone mentioned this pull request Jan 12, 2021
Gives the user the ability to specify a comma separated list
of branches to fetch. The branch list gets stored in 'extra_fields'
and refspec strings are created for each branch. A global setting
specifies whether branches can be changed or not.

fixes #64853

Signed-off-by: Florin Hillebrand <[email protected]>
This way branches to fetch are reloaded after saving project
repository settings, to show the updated repository immediately.

Signed-off-by: Florin Hillebrand <[email protected]>
Reuse the existing github webhook and generalize it, so
that it can be used with gitea too.

Signed-off-by: Florin Hillebrand <[email protected]>
When the repository grows with time a 'git fsck' takes
too long to be run on every fetch of the repository.
This might not be an issue when running periodically
with cron, but when using webhooks the request times
out for big repositories.

To workaround this problem, the user might leave the
'Remove unreachable on fetch' global setting unchecked
to skip the check while doing the fetch. Instead a
separate rake task can be used to remove any unreachable
commits periodically:

rake redmine:plugins:git_mirror:remove_unreachable_commits \
	RAILS_ENV="production"

Signed-off-by: Florin Hillebrand <[email protected]>
@flozzone flozzone force-pushed the branch_fetch_webhook branch from 1acdd02 to 1d0b277 Compare January 13, 2021 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gitea-Support
1 participant