refactor: kilo compat for v1.1.57
This commit is contained in:
+4
-4
@@ -6,7 +6,7 @@ import * as core from "@actions/core"
|
||||
import * as github from "@actions/github"
|
||||
import type { Context as GitHubContext } from "@actions/github/lib/context"
|
||||
import type { IssueCommentEvent, PullRequestReviewCommentEvent } from "@octokit/webhooks-types"
|
||||
import { createOpencodeClient } from "@opencode-ai/sdk"
|
||||
import { createOpencodeClient } from "@kilocode/sdk"
|
||||
import { spawn } from "node:child_process"
|
||||
|
||||
type GitHubAuthor = {
|
||||
@@ -362,7 +362,7 @@ function useIssueId() {
|
||||
}
|
||||
|
||||
function useShareUrl() {
|
||||
return isMock() ? "https://dev.opencode.ai" : "https://opencode.ai"
|
||||
return isMock() ? "https://dev.kilo.ai" : "https://kilo.ai"
|
||||
}
|
||||
|
||||
async function getAccessToken() {
|
||||
@@ -373,7 +373,7 @@ async function getAccessToken() {
|
||||
|
||||
let response
|
||||
if (isMock()) {
|
||||
response = await fetch("https://api.opencode.ai/exchange_github_app_token_with_pat", {
|
||||
response = await fetch("https://api.kilo.ai/exchange_github_app_token_with_pat", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Bearer ${useEnvMock().mockToken}`,
|
||||
@@ -382,7 +382,7 @@ async function getAccessToken() {
|
||||
})
|
||||
} else {
|
||||
const oidcToken = await core.getIDToken("opencode-github-action")
|
||||
response = await fetch("https://api.opencode.ai/exchange_github_app_token", {
|
||||
response = await fetch("https://api.kilo.ai/exchange_github_app_token", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Bearer ${oidcToken}`,
|
||||
|
||||
+3
-2
@@ -15,6 +15,7 @@
|
||||
"@actions/github": "6.0.1",
|
||||
"@octokit/graphql": "9.0.1",
|
||||
"@octokit/rest": "catalog:",
|
||||
"@opencode-ai/sdk": "workspace:*"
|
||||
}
|
||||
"@kilocode/sdk": "workspace:*"
|
||||
},
|
||||
"version": "1.0.14"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user