Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions create-or-update-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function isBase64(str: string | Buffer): boolean {
}

export default function (
octokit: Octokit,
octokit: Octokit | any,
opts: Options,
): Promise<CommitResult> {
return new Promise(async (resolve, reject) => {
Expand Down Expand Up @@ -295,7 +295,7 @@ export default function (
}

async function fileExistsInRepo(
octokit: Octokit,
octokit: Octokit | any,
owner: string,
repo: string,
path: string,
Expand All @@ -316,7 +316,7 @@ async function fileExistsInRepo(
}

async function createCommit(
octokit: Octokit,
octokit: Octokit | any,
owner: string,
repo: string,
committer: RestEndpointMethodTypes["git"]["createCommit"]["parameters"]["committer"],
Expand All @@ -339,7 +339,7 @@ async function createCommit(
}

async function createTree(
octokit: Octokit,
octokit: Octokit | any,
owner: string,
repo: string,
treeItems: Array<
Expand All @@ -358,7 +358,7 @@ async function createTree(
}

async function createBlob(
octokit: Octokit,
octokit: Octokit | any,
owner: string,
repo: string,
contents: string | Buffer,
Expand Down Expand Up @@ -390,7 +390,7 @@ async function createBlob(
}

async function loadRef(
octokit: Octokit,
octokit: Octokit | any,
owner: string,
repo: string,
ref: string,
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Octokit } from "@octokit/rest";

import createOrUpdateFilesPlugin from "./create-or-update-files";

export default function (octokit: Octokit) {
export default function (octokit: Octokit | any) {
return {
createOrUpdateFiles: createOrUpdateFilesPlugin.bind(null, octokit),
};
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"description": "Octokit plugin to create/update multiple files at once",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsc",
"test": "npm run build && jest",
Expand Down Expand Up @@ -36,4 +39,4 @@
"peerDependencies": {
"@octokit/rest": ">=20.0.1"
}
}
}