Skip to content

Commit

Permalink
fix: data of owner
Browse files Browse the repository at this point in the history
  • Loading branch information
adelkahomolova committed Dec 6, 2019
1 parent 6145355 commit fa0d129
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/services/bitbucket/BitbucketService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class BitbucketService implements IVCSService {
}

const ownerUrl = `www.bitbucket.org/${owner}`;
const ownerId =`${(await this.client.users.get({ username: owner })).data.uuid}`;
const ownerId = `${(await this.client.users.get({ username: owner })).data.uuid}`;

const response: DeepRequired<Bitbucket.Response<Bitbucket.Schema.PaginatedPullrequests>> = await axios.get(apiUrl);

Expand Down Expand Up @@ -144,6 +144,9 @@ export class BitbucketService implements IVCSService {
username: owner,
};

const ownerUrl = `www.bitbucket.org/${owner}`;
const ownerId = `${(await this.client.users.get({ username: owner })).data.uuid}`;

const response = <DeepRequired<Bitbucket.Response<Bitbucket.Schema.Pullrequest>>>await this.client.pullrequests.get(params);
response.data;

Expand All @@ -169,9 +172,9 @@ export class BitbucketService implements IVCSService {
name: response.data.destination.repository.name,
id: response.data.destination.repository.uuid,
owner: {
login: response.data.author.nickname,
id: response.data.author.uuid,
url: response.data.author.links.html.href,
login: owner,
id: ownerId,
url: ownerUrl,
},
},
},
Expand Down

0 comments on commit fa0d129

Please sign in to comment.