Skip to content

Commit

Permalink
Only import active Gitlab issues and merge requests
Browse files Browse the repository at this point in the history
  • Loading branch information
LordGaav committed Aug 25, 2015
1 parent 06adc5b commit 5890fe9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bugwarrior/services/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,17 @@ def get_repo_issues(self, rid):
tmpl = 'https://{host}/api/v3/projects/%d/issues' % rid
issues = {}
for issue in self._fetch_paged(tmpl):
if issue['state'] != 'opened':
continue
issues[issue['id']] = (rid, issue)
return issues

def get_repo_merge_requests(self, rid):
tmpl = 'https://{host}/api/v3/projects/%d/merge_requests' % rid
issues = {}
for issue in self._fetch_paged(tmpl):
if issue['state'] != 'opened':
continue
issues[issue['id']] = (rid, issue)
return issues

Expand Down

0 comments on commit 5890fe9

Please sign in to comment.