@@ -47,7 +47,7 @@ export class GitHubApi {
4747 fromSha ?: string ;
4848 fromTag ?: string ;
4949 name : string ;
50- } ) {
50+ } ) : Promise < any > {
5151 if ( ! fromBranch && ! fromSha && ! fromTag ) {
5252 fromBranch = await this . getDefaultBranch ( ) ;
5353 }
@@ -73,7 +73,7 @@ export class GitHubApi {
7373 *
7474 * name: Name of the branch to delete
7575 */
76- public async deleteBranch ( { name } : { name : string } ) {
76+ public async deleteBranch ( { name } : { name : string } ) : Promise < any > {
7777 const opts = {
7878 owner : this . owner ,
7979 ref : this . shortBranchRef ( name ) ,
@@ -105,7 +105,7 @@ export class GitHubApi {
105105 fromSha ?: string ;
106106 fromTag ?: string ;
107107 name : string ;
108- } ) {
108+ } ) : Promise < any > {
109109 if ( ! fromBranch && ! fromSha && ! fromTag ) {
110110 fromBranch = await this . getDefaultBranch ( ) ;
111111 }
@@ -127,7 +127,7 @@ export class GitHubApi {
127127 *
128128 * name: Name of the tag to delete
129129 */
130- public async deleteTag ( { name } : { name : string } ) {
130+ public async deleteTag ( { name } : { name : string } ) : Promise < any > {
131131 const opts = {
132132 owner : this . owner ,
133133 ref : this . shortTagRef ( name ) ,
@@ -172,7 +172,7 @@ export class GitHubApi {
172172
173173 log . debug ( `repos.getContents(${ JSON . stringify ( opts , null , 2 ) } )` ) ;
174174 const res = await this . octokit . repos . getContent ( opts ) ;
175- const buff = new Buffer ( ( res . data as any ) . content , 'base64' ) ;
175+ const buff = Buffer . from ( ( res . data as any ) . content , 'base64' ) ;
176176 return buff . toString ( 'utf8' ) ;
177177 }
178178
@@ -194,7 +194,7 @@ export class GitHubApi {
194194 onBranch ?: string ;
195195 newContent : string ;
196196 commitMessage : string ;
197- } ) {
197+ } ) : Promise < any > {
198198 const sha = (
199199 (
200200 await this . octokit . repos . getContent ( {
@@ -206,7 +206,7 @@ export class GitHubApi {
206206 ) . data as any
207207 ) . sha ;
208208
209- const buff = new Buffer ( newContent ) ;
209+ const buff = Buffer . from ( newContent ) ;
210210 const content = buff . toString ( 'base64' ) ;
211211
212212 return this . octokit . repos . createOrUpdateFileContents ( {
0 commit comments