Skip to content

Commit eb4f72a

Browse files
committed
lint
1 parent 9256ba7 commit eb4f72a

2 files changed

Lines changed: 36 additions & 33 deletions

File tree

packages/app/server/api/repo/commits.get.ts

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ export default defineEventHandler(async (event) => {
3030
: 1;
3131
const per_page = Number.parseInt(query.per_page);
3232

33-
const { data: commits } = await octokit.request("GET /repos/{owner}/{repo}/commits", {
34-
owner: query.owner,
35-
repo: query.repo,
36-
sha: defaultBranch,
37-
page,
38-
per_page,
39-
});
33+
const { data: commits } = await octokit.request(
34+
"GET /repos/{owner}/{repo}/commits",
35+
{
36+
owner: query.owner,
37+
repo: query.repo,
38+
sha: defaultBranch,
39+
page,
40+
per_page,
41+
},
42+
);
4043

4144
const commitsWithStatuses = await Promise.all(
4245
commits.map(async (commit) => {
@@ -60,29 +63,29 @@ export default defineEventHandler(async (event) => {
6063
statusCheckRollup:
6164
checkRuns.check_runs.length > 0
6265
? {
63-
id: `status-${commit.sha}`,
64-
state: checkRuns.check_runs.some(
65-
(check) => check.conclusion === "failure",
66-
)
67-
? "FAILURE"
68-
: checkRuns.check_runs.some(
69-
(check) => check.conclusion === "success",
66+
id: `status-${commit.sha}`,
67+
state: checkRuns.check_runs.some(
68+
(check) => check.conclusion === "failure",
7069
)
71-
? "SUCCESS"
72-
: "PENDING",
73-
contexts: {
74-
nodes: checkRuns.check_runs.map((check) => ({
75-
id: check.id.toString(),
76-
status: check.status,
77-
name: check.name,
78-
title: check.name,
79-
summary: check.output?.summary || "",
80-
text: check.output?.text || "",
81-
detailsUrl: check.details_url || "",
82-
url: check.url || check.html_url || "",
83-
})),
84-
},
85-
}
70+
? "FAILURE"
71+
: checkRuns.check_runs.some(
72+
(check) => check.conclusion === "success",
73+
)
74+
? "SUCCESS"
75+
: "PENDING",
76+
contexts: {
77+
nodes: checkRuns.check_runs.map((check) => ({
78+
id: check.id.toString(),
79+
status: check.status,
80+
name: check.name,
81+
title: check.name,
82+
summary: check.output?.summary || "",
83+
text: check.output?.text || "",
84+
detailsUrl: check.details_url || "",
85+
url: check.url || check.html_url || "",
86+
})),
87+
},
88+
}
8689
: null,
8790
};
8891
} catch (error) {

packages/app/server/api/repo/search.get.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ export default defineEventHandler(async (event) => {
3232
name: repo.name,
3333
owner: repo.owner
3434
? {
35-
id: repo.owner.id.toString(),
36-
login: repo.owner.login,
37-
avatarUrl: repo.owner.avatar_url,
38-
}
35+
id: repo.owner.id.toString(),
36+
login: repo.owner.login,
37+
avatarUrl: repo.owner.avatar_url,
38+
}
3939
: null,
4040
}),
4141
),

0 commit comments

Comments
 (0)