diff --git a/package.json b/package.json index 9c42fb2..dfa0b55 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "watch:firefox": "yarn run set-manifest:firefox:force && yarn watch" }, "dependencies": { - "@gitkraken/provider-apis": "0.22.7", + "@gitkraken/provider-apis": "0.22.8", "@tanstack/query-async-storage-persister": "5.32.0", "@tanstack/react-query": "5.32.0", "@tanstack/react-query-persist-client": "5.32.0", diff --git a/src/providers.ts b/src/providers.ts index 0873a17..905a8c8 100644 --- a/src/providers.ts +++ b/src/providers.ts @@ -1,7 +1,8 @@ -import type { Account, PullRequestWithUniqueID } from '@gitkraken/provider-apis'; +import type { Account } from '@gitkraken/provider-apis'; import { AzureDevOps, Bitbucket, + BitbucketServerUtils, EntityIdentifierProviderType, EntityIdentifierUtils, EntityType, @@ -60,6 +61,7 @@ const fetchGitLabFocusViewData = async (token: ProviderToken) => { const { data: pullRequests } = await gitlab.getPullRequestsAssociatedWithUser({ username: providerUser.username, + includeFromArchivedRepos: false, }); return { providerUser: providerUser, pullRequests: pullRequests.map(pr => ({ ...pr, uuid: '' })) }; @@ -96,17 +98,12 @@ const fetchBitbucketServerFocusViewData = async (token: ProviderToken) => { return { providerUser: data.user as Account, pullRequests: (data.body.values as any[]).map(pullRequest => ({ + ...BitbucketServerUtils.restApiPullRequestToCommonPullRequest(pullRequest), // Bitbucket Server PR ids are just the number, they are not unique across repos, so instead // we use the PR url as the id. id: pullRequest.links.self[0].href, - number: pullRequest.id, - title: pullRequest.title, - url: pullRequest.links.self[0].href, - repository: { - name: pullRequest.fromRef.repository.name, - }, uuid: '', - })) as PullRequestWithUniqueID[], + })), }; }; diff --git a/yarn.lock b/yarn.lock index 0e0b23a..093be34 100644 --- a/yarn.lock +++ b/yarn.lock @@ -285,10 +285,10 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.44.0.tgz#961a5903c74139390478bdc808bcde3fc45ab7af" integrity sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw== -"@gitkraken/provider-apis@0.22.7": - version "0.22.7" - resolved "https://registry.npmjs.org/@gitkraken/provider-apis/-/provider-apis-0.22.7.tgz#f217e1d275b578c33a38ce03564a10ee6b6b3e2c" - integrity sha512-twLjzIahStD4FkI10UxxikLLocE0r9IkX2qPjZiBfhyZbGKVdnFEdYdbZaeKOxTt87T6LyTPhdGnRLMrZfCWpA== +"@gitkraken/provider-apis@0.22.8": + version "0.22.8" + resolved "https://registry.npmjs.org/@gitkraken/provider-apis/-/provider-apis-0.22.8.tgz#5e70e00b94a386275b141fb42b055c7124adce15" + integrity sha512-i2/+gC1j940zjS8rn124HYPLXa7O8t3i5PbLNNB6Xp+wFCTmLeILkcuIFAV1xH1291KoqaWY0HJMZlsmpdo7ww== dependencies: js-base64 "3.7.5" node-fetch "2.7.0"