Rebuild.
This commit is contained in:
@@ -90203,7 +90203,7 @@ var repo = context2.repo.repo;
|
|||||||
async function getCommitDiff(commitSha) {
|
async function getCommitDiff(commitSha) {
|
||||||
if (PLATFORM === "gitea" || PLATFORM === "forgejo") {
|
if (PLATFORM === "gitea" || PLATFORM === "forgejo") {
|
||||||
try {
|
try {
|
||||||
const diffResponse2 = await giteaClient.repository.repoDownloadCommitDiffOrPatch({
|
const diffResponse2 = await giteaClient.repoDownloadCommitDiffOrPatch({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
sha: commitSha,
|
sha: commitSha,
|
||||||
|
|||||||
@@ -41,13 +41,12 @@ type Diff = string;
|
|||||||
async function getCommitDiff(commitSha: string): Promise<{ sha: SHA; diff: Diff }> {
|
async function getCommitDiff(commitSha: string): Promise<{ sha: SHA; diff: Diff }> {
|
||||||
if (PLATFORM === 'gitea' || PLATFORM === 'forgejo') {
|
if (PLATFORM === 'gitea' || PLATFORM === 'forgejo') {
|
||||||
try {
|
try {
|
||||||
const diffResponse =
|
const diffResponse = await giteaClient.repoDownloadCommitDiffOrPatch({
|
||||||
await giteaClient.repository.repoDownloadCommitDiffOrPatch({
|
owner,
|
||||||
owner,
|
repo,
|
||||||
repo,
|
sha: commitSha,
|
||||||
sha: commitSha,
|
diffType: 'diff',
|
||||||
diffType: 'diff',
|
});
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
sha: commitSha,
|
sha: commitSha,
|
||||||
@@ -59,7 +58,7 @@ async function getCommitDiff(commitSha: string): Promise<{ sha: SHA; diff: Diff
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// GitHub fallback remains correct
|
// GitHub path unchanged
|
||||||
const diffResponse = await octokit.request<string>(
|
const diffResponse = await octokit.request<string>(
|
||||||
'GET /repos/{owner}/{repo}/commits/{ref}',
|
'GET /repos/{owner}/{repo}/commits/{ref}',
|
||||||
{
|
{
|
||||||
@@ -75,6 +74,7 @@ async function getCommitDiff(commitSha: string): Promise<{ sha: SHA; diff: Diff
|
|||||||
return { sha: commitSha, diff: diffResponse.data };
|
return { sha: commitSha, diff: diffResponse.data };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
interface DiffAndSHA {
|
interface DiffAndSHA {
|
||||||
sha: SHA;
|
sha: SHA;
|
||||||
diff: Diff;
|
diff: Diff;
|
||||||
|
|||||||
Reference in New Issue
Block a user