Skip to content

Commit f1ead5b

Browse files
committed
Bump to Octokit v18
1 parent 2d82b17 commit f1ead5b

File tree

3 files changed

+119
-150
lines changed

3 files changed

+119
-150
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ If the `branch` provided does not exist, the plugin will error. To automatically
1717
In addition, it accepts `changes` which is an array of objects containing a `message` and a `files` object
1818

1919
```javascript
20-
const Octokit = require("@octokit/rest").plugin(
21-
require("octokit-commit-multiple-files")
22-
);
20+
let { Octokit } = require("@octokit/rest");
21+
Octokit = Octokit.plugin(require("octokit-commit-multiple-files"));
22+
2323
const octokit = new Octokit();
2424

2525
const branchName = await octokit.repos.createOrUpdateFiles({
@@ -35,18 +35,18 @@ const branchName = await octokit.repos.createOrUpdateFiles({
3535
3636
I hope it works`,
3737
"test2.md": {
38-
contents: `Something else`
39-
}
40-
}
38+
contents: `Something else`,
39+
},
40+
},
4141
},
4242
{
43-
"message": "This is a separate commit",
44-
"files": {
45-
"second.md": "Where should we go today?"
46-
}
47-
}
48-
]
49-
})
43+
message: "This is a separate commit",
44+
files: {
45+
"second.md": "Where should we go today?",
46+
},
47+
},
48+
],
49+
});
5050
```
5151

5252
In addition, you can set the `mode` of a file change. For example, if you wanted to update a submodule pointer:

0 commit comments

Comments
 (0)