Skip to content

Update gitlab:repo:check task to support subgroups

Chris requested to merge mrchrisw-fix-check-subgroups into master

What does this MR do?

gitlab:repo:check did not correctly support subgroup projects. This resulted in an error when checking subgroups: Fatal: Not a git repository (or any of the parent directories): .git

Use Dir.glob to recursively walk repository directories. Only check those ending in .git

Are there points in the code the reviewer needs to double check?

specs?

Why was this MR needed?

gitlab:repo:check should support subgroup/subprojects

Does this MR meet the acceptance criteria?

Logs

Before

Checking repo at /var/opt/gitlab/git-data/repositories/mygroup/GSM
Running `git fsck`
fatal: Not a git repository (or any of the parent directories): .git
'config.lock' file exists? ... no
No ref lock files exist

After

Checking repo at /var/opt/gitlab/git-data/repositories/mygroup/GSM/docker-openldap.git
Running `git fsck`
Checking object directories: 100% (256/256), done.
Checking objects: 100% (2776/2776), done.
'config.lock' file exists? ... no
No ref lock files exist

Merge request reports