File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 6
6
7
7
import * as vscode from 'vscode' ;
8
8
import { InMemFileChange } from '../../common/file' ;
9
+ import { isTeam } from '../../github/interface' ;
9
10
import { PullRequestModel } from '../../github/pullRequestModel' ;
10
11
import { RepoToolBase } from './toolsUtils' ;
11
12
@@ -32,6 +33,9 @@ export interface FetchIssueResult {
32
33
owner ?: string ;
33
34
repo ?: string ;
34
35
fileChanges ?: FileChange [ ] ;
36
+ author ?: string ;
37
+ assignees ?: string [ ] ;
38
+ reviewers ?: string [ ] ;
35
39
}
36
40
37
41
export class FetchIssueTool extends RepoToolBase < FetchIssueToolParameters > {
@@ -52,7 +56,10 @@ export class FetchIssueTool extends RepoToolBase<FetchIssueToolParameters> {
52
56
repo : name ,
53
57
title : issueOrPullRequest . title ,
54
58
body : issueOrPullRequest . body ,
55
- comments : issueOrPullRequest . item . comments ?. map ( c => ( { body : c . body , author : c . author . login } ) ) ?? [ ]
59
+ comments : issueOrPullRequest . item . comments ?. map ( c => ( { body : c . body , author : c . author . login } ) ) ?? [ ] ,
60
+ author : issueOrPullRequest . author ?. login ,
61
+ assignees : issueOrPullRequest . assignees ?. map ( a => a . login ) ,
62
+ reviewers : issueOrPullRequest instanceof PullRequestModel ? issueOrPullRequest . reviewers ?. map ( r => isTeam ( r ) ? r . name : r . login ) . filter ( ( login ) : login is string => ! ! login ) : undefined
56
63
} ;
57
64
if ( issueOrPullRequest instanceof PullRequestModel && issueOrPullRequest . isResolved ( ) ) {
58
65
const fileChanges = await issueOrPullRequest . getFileChangesInfo ( ) ;
You can’t perform that action at this time.
0 commit comments