So I've checked it twice, and there is actually a bug. The hook system isn't working properly on an imported repo.
create a repo MyRepoA and add a readme
create an issue and modify the readme with "fix #1 (closed)" in the commit message
-> the issue is closed
export myRepoA from edit project->export
import it as MyRepoB, create an issue and try to close it by adding "fix #2 (closed)" to your commit message.
-> the issue isn't closed
Any ideas?
If we add a gitlab-ci.yml and a worker to the imported project, nothing is called. It seems that something is blocking the hooks on an imported project.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
I am a bit alone on my issue, but I'm continuing my investigations, it looks like the hooks folder of the imported repo (B) is empty (full of samples), so the hooks created by gitlab on the exported repo (A) aren't recreated or copied. Can the correction be done easily, first with a workaround (for already imported projects) and then with a fix in gitlab importer?
Hi, so I've found the issue and I have a workaround.
So first of all, go in your /var/opt/gitlab/git-data/repositories/{"root","or an other user"} to find the .git folder of your imported repo. For the last example it would be :
# cd /var/opt/gitlab/git-data/repositories/root/MyRepoB.git/
The most important command in this was ln -s /opt/gitlab/embedded/service/gitlab-shell/hooks hooks. It recreates a hooks folder by linking to the gitlabs's one.
At this point we can clean up a bit by changing the owner back to git:
We're done! Now the automatic issue closing feature and the continuous integration should work.
This needs to be corrected in the gitlab importation process. If you don't want to remove the hooks of the imported git, gitlab should display this kind of check box:
Replace the hooks folder by the gitlab's one? Note that it is needed for features like continuous integration or automatic issue closing on commit
Can anyone (aware enough of gitlab and the importation process) send a pull request to correct this?
Note that I'm not agree on closing the issue now, as I just found a workaround.
username-removed-606790Changed title: Export - import, hooks failling → Export - import of a repo, hooks failling (Workaround found, but need to be fixed)
Changed title: Export - import, hooks failling → Export - import of a repo, hooks failling (Workaround found, but need to be fixed)