@@ -66,7 +66,7 @@ interface CheckDirtyContext {
6666 retryMax : number ;
6767}
6868async function checkDirty (
69- context : CheckDirtyContext
69+ context : CheckDirtyContext ,
7070) : Promise < Record < number , boolean > > {
7171 const {
7272 after,
@@ -164,7 +164,7 @@ query openPullRequests($owner: String!, $repo: String!, $after: String, $baseRef
164164 info (
165165 `add "${ dirtyLabel } ", remove "${
166166 removeOnDirtyLabel ? removeOnDirtyLabel : `nothing`
167- } "`
167+ } "`,
168168 ) ;
169169 // for labels PRs and issues are the same
170170 const [ addedDirtyLabel ] = await Promise . all ( [
@@ -183,7 +183,7 @@ query openPullRequests($owner: String!, $repo: String!, $after: String, $baseRef
183183 const removedDirtyLabel = await removeLabelIfExists (
184184 dirtyLabel ,
185185 pullRequest ,
186- { client }
186+ { client } ,
187187 ) ;
188188 if ( removedDirtyLabel && commentOnClean !== "" ) {
189189 await addComment ( commentOnClean , pullRequest , { client } ) ;
@@ -206,13 +206,13 @@ query openPullRequests($owner: String!, $repo: String!, $after: String, $baseRef
206206 ...dirtyStatuses ,
207207 ...newDirtyStatuses ,
208208 } ) ;
209- }
209+ } ,
210210 ) ;
211211 } , retryAfter * 1000 ) ;
212212 } ) ;
213213 default :
214214 throw new TypeError (
215- `unhandled mergeable state '${ pullRequest . mergeable } '`
215+ `unhandled mergeable state '${ pullRequest . mergeable } '` ,
216216 ) ;
217217 }
218218 }
@@ -236,7 +236,7 @@ query openPullRequests($owner: String!, $repo: String!, $after: String, $baseRef
236236async function addLabelIfNotExists (
237237 labelName : string ,
238238 issue : { number : number ; labels : { nodes : Array < { name : string } > } } ,
239- { client } : { client : GitHub }
239+ { client } : { client : GitHub } ,
240240) : Promise < boolean > {
241241 core . debug ( JSON . stringify ( issue , null , 2 ) ) ;
242242
@@ -247,7 +247,7 @@ async function addLabelIfNotExists(
247247
248248 if ( hasLabel ) {
249249 core . info (
250- `Issue #${ issue . number } already has label '${ labelName } '. No need to add.`
250+ `Issue #${ issue . number } already has label '${ labelName } '. No need to add.` ,
251251 ) ;
252252 return false ;
253253 }
@@ -268,28 +268,28 @@ async function addLabelIfNotExists(
268268 error . message . endsWith ( `Resource not accessible by integration` )
269269 ) {
270270 core . warning (
271- `could not add label "${ labelName } ": ${ commonErrorDetailedMessage } `
271+ `could not add label "${ labelName } ": ${ commonErrorDetailedMessage } ` ,
272272 ) ;
273273 } else {
274274 throw new Error ( `error adding "${ labelName } ": ${ error } ` ) ;
275275 }
276276 return false ;
277- }
277+ } ,
278278 ) ;
279279}
280280
281281async function removeLabelIfExists (
282282 labelName : string ,
283283 issue : { number : number ; labels : { nodes : Array < { name : string } > } } ,
284- { client } : { client : GitHub }
284+ { client } : { client : GitHub } ,
285285) : Promise < boolean > {
286286 const hasLabel =
287287 issue . labels . nodes . find ( ( labe ) => {
288288 return labe . name === labelName ;
289289 } ) !== undefined ;
290290 if ( ! hasLabel ) {
291291 core . info (
292- `Issue #${ issue . number } does not have label '${ labelName } '. No need to remove.`
292+ `Issue #${ issue . number } does not have label '${ labelName } '. No need to remove.` ,
293293 ) ;
294294 return false ;
295295 }
@@ -310,24 +310,24 @@ async function removeLabelIfExists(
310310 error . message . endsWith ( `Resource not accessible by integration` )
311311 ) {
312312 core . warning (
313- `could not remove label "${ labelName } ": ${ commonErrorDetailedMessage } `
313+ `could not remove label "${ labelName } ": ${ commonErrorDetailedMessage } ` ,
314314 ) ;
315315 } else if ( error . status !== 404 ) {
316316 throw new Error ( `error removing "${ labelName } ": ${ error } ` ) ;
317317 } else {
318318 core . info (
319- `On #${ issue . number } label "${ labelName } " doesn't need to be removed since it doesn't exist on that issue.`
319+ `On #${ issue . number } label "${ labelName } " doesn't need to be removed since it doesn't exist on that issue.` ,
320320 ) ;
321321 }
322322 return false ;
323- }
323+ } ,
324324 ) ;
325325}
326326
327327async function addComment (
328328 comment : string ,
329329 { number } : { number : number } ,
330- { client } : { client : GitHub }
330+ { client } : { client : GitHub } ,
331331) : Promise < void > {
332332 try {
333333 await client . rest . issues . createComment ( {
@@ -343,7 +343,7 @@ async function addComment(
343343 error . message . endsWith ( `Resource not accessible by integration` )
344344 ) {
345345 core . warning (
346- `couldn't add comment "${ comment } ": ${ commonErrorDetailedMessage } `
346+ `couldn't add comment "${ comment } ": ${ commonErrorDetailedMessage } ` ,
347347 ) ;
348348 } else {
349349 throw new Error ( `error adding "${ comment } ": ${ error } ` ) ;
0 commit comments