Skip to content

Commit a0f52e6

Browse files
committed
Merge branch fix/issues/109 into devel
2 parents 8fc87b2 + 21de7bd commit a0f52e6

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.0
1+
1.8.1

git_repo/repo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def do_open(self):
402402
@register_action('request', 'ls')
403403
@register_action('request', 'list')
404404
def do_request_list(self):
405-
service = self.get_service()
405+
service = self.get_service(lookup_repository=self.repo_slug == None)
406406
log.info('List of open requests to merge:')
407407
log.info(" {}\t{}\t{}".format('id', 'title'.ljust(60), 'URL'))
408408
for pr in service.request_list(self.user_name, self.repo_name):

tests/integration/test_main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,12 @@ def test_request_list(self, capsys, caplog):
306306
assert out == ' 1\tdesc1 \thttp://request/1\n 2\tdesc2 \thttp://request/2\n 3\tdesc3 \thttp://request/3\n'
307307
assert 'id' in caplog.text and 'title' in caplog.text and 'URL' in caplog.text
308308

309+
def test_request_list__with_repo_slug__no_repo(self, capsys, caplog):
310+
repo_slug, seen_args = self.main_request_list('guyzmo/git-repo', 0, args={})
311+
out, err = capsys.readouterr()
312+
assert out == ' 1\tdesc1 \thttp://request/1\n 2\tdesc2 \thttp://request/2\n 3\tdesc3 \thttp://request/3\n'
313+
assert 'id' in caplog.text and 'title' in caplog.text and 'URL' in caplog.text
314+
309315
# Commented out because this does not work on travis CI
310316
# def test_request_list__no_repo_slug__git(self, capsys, caplog):
311317
# from subprocess import call

0 commit comments

Comments
 (0)