Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtiomTr committed Sep 9, 2024
1 parent f5f3847 commit 7f750dd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/utils/getPrPatch.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { context, getOctokit } from '@actions/github';
import { Endpoints } from '@octokit/types';

import { Options } from '../typings/Options';
import { Endpoints } from "@octokit/types";

type getPullsResponse = Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}"]["response"];
type getPullsResponse = Endpoints['GET /repos/{owner}/{repo}/pulls/{pull_number}']['response'];

export async function getPrPatch(
octokit: ReturnType<typeof getOctokit>,
Expand All @@ -16,14 +17,16 @@ export async function getPrPatch(
const headSha = pullsResponse.data.head.sha;
const baseSha = pullsResponse.data.base.sha;

const compareResponse: {data: string} = ((await octokit.rest.repos.compareCommits({
const compareResponse: {
data: string;
} = ((await octokit.rest.repos.compareCommits({
...context.repo,
base: baseSha,
head: headSha,
headers: {
accept: 'application/vnd.github.v3.patch',
},
}) as unknown) as {data: string});
})) as unknown) as { data: string };

return compareResponse.data;
}

0 comments on commit 7f750dd

Please sign in to comment.