Skip to content

Commit 5a5acb5

Browse files
chore(deps): update dependency prettier to v3 (#108)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: eps1lon <[email protected]>
1 parent 570a76f commit 5a5acb5

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@actions/github": "6.0.0",
1414
"@types/node": "^20.11.30",
1515
"@vercel/ncc": "0.38.1",
16-
"prettier": "2.8.8",
16+
"prettier": "3.2.5",
1717
"typescript": "5.4.3"
1818
},
1919
"prettier": {

sources/main.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ interface CheckDirtyContext {
6666
retryMax: number;
6767
}
6868
async 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
236236
async 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

281281
async 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

327327
async 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}`);

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ once@^1.4.0:
149149
dependencies:
150150
wrappy "1"
151151

152-
prettier@2.8.8:
153-
version "2.8.8"
154-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
155-
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
152+
prettier@3.2.5:
153+
version "3.2.5"
154+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368"
155+
integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==
156156

157157
tunnel@^0.0.6:
158158
version "0.0.6"

0 commit comments

Comments
 (0)