@@ -6,9 +6,9 @@ import { Payload } from '../entities/job';
6
6
7
7
export interface IGithubConnector {
8
8
getParentPRs ( payload : Payload ) : Promise < Array < number > > ;
9
- postComment ( payload : Payload , pr : number , message : string ) : Promise < 201 | undefined > ;
10
- updateComment ( payload : Payload , pr : number , message : string ) : Promise < 200 | undefined > ;
11
- getPullRequestCommentId ( Payload : Payload , pr : number ) : Promise < number | undefined > ;
9
+ postComment ( payload : Payload , pr : number , message : string ) : Promise < 201 | undefined > ;
10
+ updateComment ( payload : Payload , pr : number , message : string ) : Promise < 200 | undefined > ;
11
+ getPullRequestCommentId ( Payload : Payload , pr : number ) : Promise < number | undefined > ;
12
12
}
13
13
14
14
export class GithubConnector implements IGithubConnector {
@@ -81,17 +81,17 @@ export class GithubConnector implements IGithubConnector {
81
81
'X-GitHub-Api-Version' : '2022-11-28' ,
82
82
} ,
83
83
} ) ;
84
- return 201
84
+ return 201 ;
85
85
} catch ( error ) {
86
86
this . _logger . error ( `Failed to post to Github` , error ) ;
87
- return
87
+ return ;
88
88
}
89
89
}
90
90
91
91
// Given the comment ID of the comment posted by the docs-builder-bot user
92
92
// as returned by getPullRequestCommentId, update the comment as needed
93
93
// (i.e. with a new build log) by appending the link to the end.
94
- async updateComment ( payload : Payload , comment : number , message : string ) : Promise < 200 | undefined > {
94
+ async updateComment ( payload : Payload , comment : number , message : string ) : Promise < 200 | undefined > {
95
95
const resp = await this . _octokit . request ( 'GET /repos/{owner}/{repo}/issues/comments/{comment_id}' , {
96
96
owner : 'schmalliso' ,
97
97
repo : 'docs-ecosystem' ,
@@ -108,16 +108,16 @@ export class GithubConnector implements IGithubConnector {
108
108
comment_id : comment ,
109
109
body : newComment ,
110
110
} ) ;
111
- return 200
111
+ return 200 ;
112
112
} catch ( error ) {
113
113
console . log ( error ) ;
114
- return
114
+ return ;
115
115
}
116
116
}
117
117
118
118
// get the ID of the comment created by the docs-builder-bot user
119
119
// if there is no docs-builder-bot comment, return null
120
- async getPullRequestCommentId ( payload : Payload , pr : number ) : Promise < number | undefined > {
120
+ async getPullRequestCommentId ( payload : Payload , pr : number ) : Promise < number | undefined > {
121
121
const comments = await this . _octokit . request ( 'GET /repos/{owner}/{repo}/issues/{issue_number}/comments' , {
122
122
owner : 'schmalliso' ,
123
123
repo : payload . repoName ,
0 commit comments