Skip to content

Commit

Permalink
Merge pull request #235 from LordGaav/feature/close-gitlab-issues
Browse files Browse the repository at this point in the history
Only import active Gitlab issues and merge requests
  • Loading branch information
ralphbean committed Sep 1, 2015
2 parents 6ff7cfc + 5890fe9 commit 0664bd0
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 @@ -281,13 +281,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 0664bd0

Please sign in to comment.