git-repo
git-repo copied to clipboard
Bitbutcket request ls shows more than just open PRs
For some reason the bitbucket PR list shows all PRs, not just open ones.
Delete this line (and the comma on the previous line) and it works fine.
https://github.com/guyzmo/git-repo/blob/devel/git_repo/services/ext/bitbucket.py#L323
I did not look into why that fixes it.
what is the command to reproduce this from the cli?
what is the command to reproduce this from the cli?
For example, I do this and get some errors:
$ git bb request create test --title=asdf --message=asdf
Fatal error: 'Repository' object has no attribute 'parent'
I have no idea on why creating PRs is broken. The way I did this is to open two PRs in the web interface and merge one.
Also I was wrong about my initial statement to fix it the request ls
issue, some formatting stuff had to be copied from services/ext/github.py
diff --git a/git_repo/services/ext/bitbucket.py b/git_repo/services/ext/bitbucket.py
index 5b2c43d..550b101 100644
--- a/git_repo/services/ext/bitbucket.py
+++ b/git_repo/services/ext/bitbucket.py
@@ -319,10 +319,11 @@ class BitbucketService(RepositoryService):
r.links['html']['href']
) for r in self.bb.repositoryPullRequestsInState(
owner=user,
- repository_name=repo,
- state='open'
+ repository_name=repo
) if not isinstance(r, dict) # if no PR is empty, result is a dict
)
+ yield "{}\t{:<60}\t{}"
+ yield 'id', 'title', 'URL'
for pull in sorted(requests):
try:
yield pull
otherwise bb request ls
will result in
Fatal error: 'tuple' object has no attribute 'format'
Ok, but what I am typing is the expected way to create a repo? I can probably have a look at some point as long as I know the correct entry point.
@cottrell to create a new repo, it should be git bb create my_new_repo
also I just pushed your fix within #198 ☺ thanks @mtfurlan 👍