File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77import * as vscode from 'vscode' ;
88import { InMemFileChange } from '../../common/file' ;
9+ import { isTeam } from '../../github/interface' ;
910import { PullRequestModel } from '../../github/pullRequestModel' ;
1011import { RepoToolBase } from './toolsUtils' ;
1112
@@ -32,6 +33,9 @@ export interface FetchIssueResult {
3233 owner ?: string ;
3334 repo ?: string ;
3435 fileChanges ?: FileChange [ ] ;
36+ author ?: string ;
37+ assignees ?: string [ ] ;
38+ reviewers ?: string [ ] ;
3539}
3640
3741export class FetchIssueTool extends RepoToolBase < FetchIssueToolParameters > {
@@ -52,7 +56,10 @@ export class FetchIssueTool extends RepoToolBase<FetchIssueToolParameters> {
5256 repo : name ,
5357 title : issueOrPullRequest . title ,
5458 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
5663 } ;
5764 if ( issueOrPullRequest instanceof PullRequestModel && issueOrPullRequest . isResolved ( ) ) {
5865 const fileChanges = await issueOrPullRequest . getFileChangesInfo ( ) ;
You can’t perform that action at this time.
0 commit comments