Skip to content

Commit

Permalink
Merge pull request #377 from codecov/dana/fix/missing-username
Browse files Browse the repository at this point in the history
get author.nickname instead of author.username based on bb api
  • Loading branch information
dana-yaish authored May 15, 2023
2 parents 79f482b + ee9a681 commit 09acda7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shared/torngit/bitbucket.py
Original file line number Diff line number Diff line change
@@ -436,7 +436,11 @@ async def get_pull_request(self, pullid, token=None):
return dict(
author=dict(
id=str(res["author"]["uuid"][1:-1]) if res["author"] else None,
username=res["author"].get("username") if res["author"] else None,
username=(
res["author"].get("nickname") or res["author"].get("username")
)
if res["author"]
else None,
),
base=dict(
branch=res["destination"]["branch"]["name"], commitid=base["hash"]

0 comments on commit 09acda7

Please sign in to comment.