davideuler / gitblit

Automatically exported from code.google.com/p/gitblit
Apache License 2.0
0 stars 0 forks source link

RepositoryLifeCycleListener is not being called on repo fork/move #579

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Would be nice to detect new or moved repos so that interesting parties could 
initiate automated clone.
Right now RepositoryLifeCycleListener.onCreation is not triggered if a new repo 
is generated by fork or it if it is moved/renamed. 
At the same time if a repo created from a fork is deleted, 
RepositoryLifeCycleListener.onDeletion is properly called.

Original issue reported on code.google.com by yur...@gmail.com on 1 Apr 2015 at 10:47

GoogleCodeExporter commented 9 years ago
Do you think onCreation should be called or perhaps a new method onFork?

Move/rename should not trigger onCreation.  Perhaps it should call an onUpdate 
or onRename method.

Original comment by James.Mo...@gmail.com on 2 Apr 2015 at 12:19

GoogleCodeExporter commented 9 years ago
Yes, anything you mentioned would work as long as listeners could have a chance 
to update the "view" of the repo set. In my particular use case, I execute 
grokmirror (https://github.com/mricon/grokmirror) manifest update on 
postReceive and repo lifecycle events. But because events are missing for 
forks, moves, and renames, the manifest is not updated.

Original comment by yur...@gmail.com on 2 Apr 2015 at 3:55

GoogleCodeExporter commented 9 years ago
And i think rename is generally a move - so one callback onMove would be 
sufficient.

Original comment by yur...@gmail.com on 2 Apr 2015 at 3:58