build: run prettier to fix lint (#270)

This commit is contained in:
David Sanders 2023-12-21 15:00:44 -08:00 коммит произвёл GitHub
Родитель 1dafb68c6d
Коммит 33193f040f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 22 добавлений и 25 удалений

Просмотреть файл

@ -118,8 +118,7 @@ describe('trop', () => {
data: [
{
id: 208045946,
url:
'https://api.github.com/repos/octocat/Hello-World/labels/bug',
url: 'https://api.github.com/repos/octocat/Hello-World/labels/bug',
name: 'bug',
description: "Something isn't working",
color: 'f29513',
@ -244,8 +243,9 @@ describe('trop', () => {
await robot.receive(event);
const updatePayload = (checkUtils.updateBackportInformationCheck as jest.Mock)
.mock.calls[0][2];
const updatePayload = (
checkUtils.updateBackportInformationCheck as jest.Mock
).mock.calls[0][2];
expect(updatePayload).toMatchObject({
title: 'Conflicting Backport Information',
@ -268,8 +268,9 @@ describe('trop', () => {
await robot.receive(event);
const updatePayload = (checkUtils.updateBackportInformationCheck as jest.Mock)
.mock.calls[0][2];
const updatePayload = (
checkUtils.updateBackportInformationCheck as jest.Mock
).mock.calls[0][2];
expect(updatePayload).toMatchObject({
title: 'Backport Information Provided',
@ -291,8 +292,9 @@ describe('trop', () => {
await robot.receive(event);
const updatePayload = (checkUtils.updateBackportInformationCheck as jest.Mock)
.mock.calls[0][2];
const updatePayload = (
checkUtils.updateBackportInformationCheck as jest.Mock
).mock.calls[0][2];
expect(updatePayload).toMatchObject({
title: 'Backport Information Provided',

Просмотреть файл

@ -540,8 +540,7 @@ const probotHandler: ApplicationFunction = async (robot, { getRouter }) => {
await context.octokit.issues.createComment(
context.repo({
issue_number: issue.number,
body:
'This PR has not been merged yet, and cannot be backported.',
body: 'This PR has not been merged yet, and cannot be backported.',
}),
);
return false;
@ -560,8 +559,7 @@ const probotHandler: ApplicationFunction = async (robot, { getRouter }) => {
).data as WebHookPR;
await context.octokit.issues.createComment(
context.repo({
body:
'The backport process for this PR has been manually initiated - here we go! :D',
body: 'The backport process for this PR has been manually initiated - here we go! :D',
issue_number: issue.number,
}),
);

Просмотреть файл

@ -113,14 +113,13 @@ please check out #${pr.number}`;
// TODO(codebytere): Once probot updates to @octokit/rest@16 we can use .paginate to
// get all the comments properly, for now 100 should do
const {
data: existingComments,
} = await context.octokit.issues.listComments(
context.repo({
issue_number: oldPRNumber,
per_page: 100,
}),
);
const { data: existingComments } =
await context.octokit.issues.listComments(
context.repo({
issue_number: oldPRNumber,
per_page: 100,
}),
);
// We should only comment if there is not a previous existing comment
const shouldComment = !existingComments.some(

Просмотреть файл

@ -116,8 +116,7 @@ const tryBackportAllCommits = async (opts: TryBackportOptions) => {
await context.octokit.issues.createComment(
context.repo({
issue_number: opts.pr.number,
body:
'This PR has exceeded the automatic backport commit limit \
body: 'This PR has exceeded the automatic backport commit limit \
and must be performed manually.',
}),
);
@ -357,9 +356,8 @@ const checkUserHasWriteAccess = async (
);
const params = context.repo({ username: user });
const {
data: userInfo,
} = await context.octokit.repos.getCollaboratorPermissionLevel(params);
const { data: userInfo } =
await context.octokit.repos.getCollaboratorPermissionLevel(params);
// Possible values for the permission key: 'admin', 'write', 'read', 'none'.
// In order for the user's review to count, they must be at least 'write'.