@@ -6,9 +6,9 @@ import { Payload } from '../entities/job';
66
77export interface IGithubConnector {
88 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 > ;
1212}
1313
1414export class GithubConnector implements IGithubConnector {
@@ -81,17 +81,17 @@ export class GithubConnector implements IGithubConnector {
8181 'X-GitHub-Api-Version' : '2022-11-28' ,
8282 } ,
8383 } ) ;
84- return 201
84+ return 201 ;
8585 } catch ( error ) {
8686 this . _logger . error ( `Failed to post to Github` , error ) ;
87- return
87+ return ;
8888 }
8989 }
9090
9191 // Given the comment ID of the comment posted by the docs-builder-bot user
9292 // as returned by getPullRequestCommentId, update the comment as needed
9393 // (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 > {
9595 const resp = await this . _octokit . request ( 'GET /repos/{owner}/{repo}/issues/comments/{comment_id}' , {
9696 owner : 'schmalliso' ,
9797 repo : 'docs-ecosystem' ,
@@ -108,16 +108,16 @@ export class GithubConnector implements IGithubConnector {
108108 comment_id : comment ,
109109 body : newComment ,
110110 } ) ;
111- return 200
111+ return 200 ;
112112 } catch ( error ) {
113113 console . log ( error ) ;
114- return
114+ return ;
115115 }
116116 }
117117
118118 // get the ID of the comment created by the docs-builder-bot user
119119 // 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 > {
121121 const comments = await this . _octokit . request ( 'GET /repos/{owner}/{repo}/issues/{issue_number}/comments' , {
122122 owner : 'schmalliso' ,
123123 repo : payload . repoName ,
0 commit comments