File tree 2 files changed +25
-20
lines changed
src/plus/integrations/providers
2 files changed +25
-20
lines changed Original file line number Diff line number Diff line change @@ -10,32 +10,17 @@ import type { RepositoryMetadata } from '../../../git/models/repositoryMetadata'
10
10
import { getSettledValue } from '../../../system/promise' ;
11
11
import type { IntegrationAuthenticationProviderDescriptor } from '../authentication/integrationAuthenticationProvider' ;
12
12
import type { ProviderAuthenticationSession } from '../authentication/models' ;
13
- import type { ResourceDescriptor } from '../integration' ;
14
13
import { HostingIntegration } from '../integration' ;
14
+ import type {
15
+ BitbucketRemoteRepositoryDescriptor ,
16
+ BitbucketRepositoryDescriptor ,
17
+ BitbucketWorkspaceDescriptor ,
18
+ } from './bitbucket/models' ;
15
19
import { providersMetadata } from './models' ;
16
20
17
21
const metadata = providersMetadata [ HostingIntegrationId . Bitbucket ] ;
18
22
const authProvider = Object . freeze ( { id : metadata . id , scopes : metadata . scopes } ) ;
19
23
20
- interface BitbucketRepositoryDescriptor extends ResourceDescriptor {
21
- owner : string ;
22
- name : string ;
23
- }
24
-
25
- interface BitbucketWorkspaceDescriptor extends ResourceDescriptor {
26
- id : string ;
27
- name : string ;
28
- slug : string ;
29
- }
30
-
31
- interface BitbucketRemoteRepositoryDescriptor extends ResourceDescriptor {
32
- resourceId : string ;
33
- owner : string ;
34
- name : string ;
35
- cloneUrlHttps ?: string ;
36
- cloneUrlSsh ?: string ;
37
- }
38
-
39
24
export class BitbucketIntegration extends HostingIntegration <
40
25
HostingIntegrationId . Bitbucket ,
41
26
BitbucketRepositoryDescriptor
Original file line number Diff line number Diff line change @@ -3,6 +3,26 @@ import type { IssueOrPullRequestState } from '../../../../git/models/issueOrPull
3
3
import type { PullRequestMember , PullRequestReviewer } from '../../../../git/models/pullRequest' ;
4
4
import { PullRequest , PullRequestReviewDecision , PullRequestReviewState } from '../../../../git/models/pullRequest' ;
5
5
import type { Provider } from '../../../../git/models/remoteProvider' ;
6
+ import type { ResourceDescriptor } from '../../integration' ;
7
+
8
+ export interface BitbucketRepositoryDescriptor extends ResourceDescriptor {
9
+ owner : string ;
10
+ name : string ;
11
+ }
12
+
13
+ export interface BitbucketWorkspaceDescriptor extends ResourceDescriptor {
14
+ id : string ;
15
+ name : string ;
16
+ slug : string ;
17
+ }
18
+
19
+ export interface BitbucketRemoteRepositoryDescriptor extends ResourceDescriptor {
20
+ resourceId : string ;
21
+ owner : string ;
22
+ name : string ;
23
+ cloneUrlHttps ?: string ;
24
+ cloneUrlSsh ?: string ;
25
+ }
6
26
7
27
export type BitbucketPullRequestState = 'OPEN' | 'DECLINED' | 'MERGED' | 'SUPERSEDED' ;
8
28
You can’t perform that action at this time.
0 commit comments