@@ -43,7 +43,7 @@ module.exports = function(octokit, opts) {
43
43
if ( ! base ) {
44
44
// Work out the default branch
45
45
base = (
46
- await octokit . repos . get ( {
46
+ await octokit . rest . repos . get ( {
47
47
owner,
48
48
repo
49
49
} )
@@ -175,7 +175,7 @@ module.exports = function(octokit, opts) {
175
175
updateRefBase = "" ;
176
176
}
177
177
178
- await octokit . git [ action ] ( {
178
+ await octokit . rest . git [ action ] ( {
179
179
owner,
180
180
repo,
181
181
force : true ,
@@ -194,7 +194,7 @@ module.exports = function(octokit, opts) {
194
194
195
195
async function fileExistsInRepo ( octokit , owner , repo , path , branch ) {
196
196
try {
197
- await octokit . repos . getContent ( {
197
+ await octokit . rest . repos . getContent ( {
198
198
method : "HEAD" ,
199
199
owner,
200
200
repo,
@@ -218,7 +218,7 @@ async function createCommit(
218
218
baseTree
219
219
) {
220
220
return (
221
- await octokit . git . createCommit ( {
221
+ await octokit . rest . git . createCommit ( {
222
222
owner,
223
223
repo,
224
224
message,
@@ -232,7 +232,7 @@ async function createCommit(
232
232
233
233
async function createTree ( octokit , owner , repo , treeItems , baseTree ) {
234
234
return (
235
- await octokit . git . createTree ( {
235
+ await octokit . rest . git . createTree ( {
236
236
owner,
237
237
repo,
238
238
tree : treeItems ,
@@ -246,7 +246,7 @@ async function createBlob(octokit, owner, repo, contents, type) {
246
246
return contents ;
247
247
} else {
248
248
const file = (
249
- await octokit . git . createBlob ( {
249
+ await octokit . rest . git . createBlob ( {
250
250
owner,
251
251
repo,
252
252
content : Buffer . from ( contents ) . toString ( "base64" ) ,
@@ -259,7 +259,7 @@ async function createBlob(octokit, owner, repo, contents, type) {
259
259
260
260
async function loadRef ( octokit , owner , repo , ref ) {
261
261
try {
262
- const x = await octokit . git . getRef ( {
262
+ const x = await octokit . rest . git . getRef ( {
263
263
owner,
264
264
repo,
265
265
ref : `heads/${ ref } `
0 commit comments