File tree Expand file tree Collapse file tree 5 files changed +12
-10
lines changed Expand file tree Collapse file tree 5 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ export class CombinedBranch {
31
31
}
32
32
33
33
get displayName ( ) : string {
34
- return this . remoteBranch ?. displayName || this . vbranch ?. name || 'unknown' ;
34
+ return (
35
+ this . pr ?. sourceBranch || this . remoteBranch ?. displayName || this . vbranch ?. name || 'unknown'
36
+ ) ;
35
37
}
36
38
37
39
get authors ( ) : Author [ ] {
@@ -101,7 +103,7 @@ export class CombinedBranch {
101
103
if ( this . vbranch ) identifiers . push ( this . vbranch . name ) ;
102
104
if ( this . pr ) {
103
105
identifiers . push ( this . pr . title ) ;
104
- identifiers . push ( this . pr . targetBranch ) ;
106
+ identifiers . push ( this . pr . sourceBranch ) ;
105
107
this . pr . author ?. email && identifiers . push ( this . pr . author . email ) ;
106
108
this . pr . author ?. name && identifiers . push ( this . pr . author . name ) ;
107
109
}
Original file line number Diff line number Diff line change 67
67
await remotesService .addRemote (project .id , remoteName , remoteUrl );
68
68
await baseBranchService .fetchFromRemotes ();
69
69
await branchController .createvBranchFromBranch (
70
- ` refs/remotes/${remoteName }/${pullrequest .targetBranch } `
70
+ ` refs/remotes/${remoteName }/${pullrequest .sourceBranch } `
71
71
);
72
72
await virtualBranchService .reload ();
73
73
const vbranch = await virtualBranchService .getByUpstreamSha (pullrequest .sha );
132
132
</span >
133
133
wants to merge into
134
134
<span class =" code-string" >
135
- {pullrequest .sourceBranch }
135
+ {pullrequest .targetBranch }
136
136
</span >
137
137
from
138
138
<span class =" code-string" >
139
- {pullrequest .targetBranch }
139
+ {pullrequest .sourceBranch }
140
140
</span >
141
141
</div >
142
142
{#if pullrequest .body }
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ export interface PullRequest {
15
15
author : Author | null ;
16
16
labels : Label [ ] ;
17
17
draft : boolean ;
18
- targetBranch : string ;
19
18
sourceBranch : string ;
19
+ targetBranch : string ;
20
20
sha : string ;
21
21
createdAt : Date ;
22
22
modifiedAt : Date ;
@@ -102,8 +102,8 @@ export function ghResponseToInstance(
102
102
draft : pr . draft || false ,
103
103
createdAt : new Date ( pr . created_at ) ,
104
104
modifiedAt : new Date ( pr . created_at ) ,
105
- targetBranch : pr . head . ref ,
106
- sourceBranch : pr . base . ref ,
105
+ sourceBranch : pr . head . ref ,
106
+ targetBranch : pr . base . ref ,
107
107
sha : pr . head . sha ,
108
108
mergedAt : pr . merged_at ? new Date ( pr . merged_at ) : undefined ,
109
109
closedAt : pr . closed_at ? new Date ( pr . closed_at ) : undefined ,
Original file line number Diff line number Diff line change 11
11
function getBranchLink(b : CombinedBranch ): string | undefined {
12
12
if (b .vbranch ?.active ) return ` /${projectId }/board/ ` ;
13
13
if (b .vbranch ) return ` /${projectId }/stashed/${b .vbranch .id } ` ;
14
- if (b .remoteBranch ) return ` /${projectId }/remote/${branch ?.displayName } ` ;
14
+ if (b .remoteBranch ) return ` /${projectId }/remote/${branch ?.remoteBranch ?. displayName } ` ;
15
15
if (b .pr ) return ` /${projectId }/pull/${b .pr .number } ` ;
16
16
}
17
17
Original file line number Diff line number Diff line change 86
86
isFetchingChecks = true ;
87
87
88
88
try {
89
- checksStatus = await githubService .checks ($pr$ ?.targetBranch );
89
+ checksStatus = await githubService .checks ($pr$ ?.sourceBranch );
90
90
} catch (e : any ) {
91
91
console .error (e );
92
92
checksError = e .message ;
You can’t perform that action at this time.
0 commit comments