GothenburgBitFactory / bugwarrior

Pull github, bitbucket, and trac issues into taskwarrior
http://pypi.python.org/pypi/bugwarrior
GNU General Public License v3.0
732 stars 209 forks source link

Gitlab query not working as expected #924

Closed folofjc closed 2 years ago

folofjc commented 2 years ago

I have this in my .bugwarriorrc for one of my services:

[tum_erc]
service = gitlab
gitlab.login = mylogin
gitlab.assignee = myusername
gitlab.username = myusername
gitlab.involved_issues = True
gitlab.host = gitlabhost.com
gitlab.include_repos = proj/foo
gitlab.import_labels_as_tags = False
gitlab.issue_query = issues?assignee_username=myusername&state=opened&scope=all
gitlab.merge_request_query = merge_requests?state=opened&scope=all&reviewer_username=myusername

When I run with debug logging, I get this:

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): gitlab.lrz.de:443
DEBUG:urllib3.connectionpool:https://gitlabhost.com:443 "GET /api/v4/projects/proj%2Ffoo?simple=true HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): gitlabhost.com:443
DEBUG:urllib3.connectionpool:https://gitlabhost.com:443 "GET /api/v4/projects/68452/issues?state=opened&page=1&per_page=100 HTTP/1.1" 200 None
DEBUG:bugwarrior.services.gitlab: Found 11 issues.
DEBUG:bugwarrior.services.gitlab: Pruned down to 11 issues.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): gitlabhost.com:443
DEBUG:urllib3.connectionpool:https://gitlabhost.com:443 "GET /api/v4/projects/68452/merge_requests?state=opened&page=1&per_page=100 HTTP/1.1" 200 None
DEBUG:bugwarrior.services.gitlab: Found 4 merge requests.
DEBUG:bugwarrior.services.gitlab: Pruned down to 4 merge requests.

As you can see, it is not using my query. Is my syntax wrong? I copied directly from the docs.

I installed via pip and have version 1.8.0.

folofjc commented 2 years ago

Okay, looks like the version 1.8.0 is my problem. This was added in #876, which is not in 1.8.0. Any idea when this will be pushed out? I have repos of thousands of issues and querying all the repos would take too long.

folofjc commented 2 years ago

I updated to the github version since it looks like 1.8.0 was updated in 2020 so might be a while until the next release.