diff --git a/src/generate-permits-from-context.ts b/src/generate-permits-from-context.ts index b4918ff..58571e3 100644 --- a/src/generate-permits-from-context.ts +++ b/src/generate-permits-from-context.ts @@ -71,7 +71,7 @@ export async function generatePermitsFromContext() { async function returnDataToKernel(repoToken: string, stateId: string, output: object) { const octokit = new Octokit({ auth: repoToken }); - await octokit.repos.createDispatchEvent({ + await octokit.rest.repos.createDispatchEvent({ owner: github.context.repo.owner, repo: github.context.repo.repo, event_type: "return_data_to_ubiquibot_kernel", @@ -93,7 +93,7 @@ async function handleSlashCommands(context: Context, octokit: Octokit) { const address = matches[0]; // try registering wallet, if it fails, notify the user if (!(await registerWallet(context, address))) { - await octokit.issues.createComment({ + await octokit.rest.issues.createComment({ owner: github.context.repo.owner, repo: github.context.repo.repo, issue_number: payload.issue.number, diff --git a/src/handlers/generate-erc20-permit.ts b/src/handlers/generate-erc20-permit.ts index 35f1e1d..1936286 100644 --- a/src/handlers/generate-erc20-permit.ts +++ b/src/handlers/generate-erc20-permit.ts @@ -41,7 +41,7 @@ export async function generateErc20PermitSignature( const config = contextOrPayload.config; logger = contextOrPayload.logger; const { evmNetworkId: configEvmNetworkId, evmPrivateEncrypted: configEvmPrivateEncrypted } = config; - const { data: userData } = await contextOrPayload.octokit.users.getByUsername({ username: _username }); + const { data: userData } = await contextOrPayload.octokit.rest.users.getByUsername({ username: _username }); if (!userData) { throw new Error(`GitHub user was not found for id ${_username}`); } diff --git a/src/handlers/generate-erc721-permit.ts b/src/handlers/generate-erc721-permit.ts index 39ebced..35e07a9 100644 --- a/src/handlers/generate-erc721-permit.ts +++ b/src/handlers/generate-erc721-permit.ts @@ -82,7 +82,7 @@ export async function generateErc721PermitSignature( } _organizationName = contextOrPermitPayload.payload.repository.owner.login; _repositoryName = contextOrPermitPayload.payload.repository.name; - const { data: userData } = await contextOrPermitPayload.octokit.users.getByUsername({ username: _username }); + const { data: userData } = await contextOrPermitPayload.octokit.rest.users.getByUsername({ username: _username }); if (!userData) { throw new Error(`GitHub user was not found for id ${_username}`); }