gitlab-time-tracker icon indicating copy to clipboard operation
gitlab-time-tracker copied to clipboard

gtt fails if 'merge requests' feature is off

Open daniviga opened this issue 6 years ago • 3 comments

We have some projects on a self-hosted GitLab instance that are mainly used for issue tracking and thus they have the 'merge requests' feature off.

Screenshot from 2019-09-27 11-19-12

In such cases gtt fails with an error:

gtt report sysadmin/infrastructure
🔍  Selected projects: sysadmin/infrastructure
🔍  Resolving "sysadmin/infrastructure"... ✓
📦  Fetching issues... ✓
📦  Fetching merge requests... ✗
Error: could not fetch merge requests.

Everything works fine with the feature enabled.

Would it be possible to just skip the collection of statistics from 'merge requests' when the feature has been disabled instead of making the entire process fail?

We are running gtt 1.7.40 on Linux. Many thanks for your work!

daniviga avatar Sep 27 '19 09:09 daniviga

@daniviga try

gtt report --query=issues sysadmin/infrastructure

it will skip merge requests

qelphybox avatar Oct 14 '19 19:10 qelphybox

the same happens for me. It should just skip or check before attempting to get MRs if they are enabled.

HacKanCuBa avatar Jan 29 '20 19:01 HacKanCuBa

Yes, it would be nice if this could be dynamic since when you are running against a "group" you could have a mix of projects with the features enabled or disabled. Having a "soft fail" if a project is missing issues, or missing merge requests would be optimal

johnjaylward avatar Dec 10 '20 23:12 johnjaylward