Skip to content

Commit 13782fa

Browse files
committed
Fix plugin binding in new Octokit versions
1 parent 454f8de commit 13782fa

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const octokit = new Octokit({
2020

2121
// Values in capitals are the default behaviour
2222
// Only `owner` is required
23-
const repos = await octokit.repos.fetchAll({
23+
const repos = await octokit.fetchAllRepos({
2424
owner: "user OR org OR org/team",
2525
visibility: "ALL/public/private",
2626
minimum_access: "PULL/push/admin",

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
const plugin = require("./fetch-repos.js");
1+
import plugin from "./fetch-repos.js";
22

33
module.exports = function (octokit) {
4-
octokit.repos.fetchAll = plugin.bind(null, octokit);
4+
return {
5+
fetchAllRepos: plugin.bind(null, octokit),
6+
};
57
};

0 commit comments

Comments
 (0)