@@ -41,7 +41,7 @@ module.exports = function(octokit, opts) {
41
41
if ( ! base ) {
42
42
// Work out the default branch
43
43
base = (
44
- await octokit . repos . get ( {
44
+ await octokit . rest . repos . get ( {
45
45
owner,
46
46
repo
47
47
} )
@@ -171,7 +171,7 @@ module.exports = function(octokit, opts) {
171
171
updateRefBase = "" ;
172
172
}
173
173
174
- await octokit . git [ action ] ( {
174
+ await octokit . rest . git [ action ] ( {
175
175
owner,
176
176
repo,
177
177
force : true ,
@@ -190,7 +190,7 @@ module.exports = function(octokit, opts) {
190
190
191
191
async function fileExistsInRepo ( octokit , owner , repo , path , branch ) {
192
192
try {
193
- await octokit . repos . getContent ( {
193
+ await octokit . rest . repos . getContent ( {
194
194
method : "HEAD" ,
195
195
owner,
196
196
repo,
@@ -205,7 +205,7 @@ async function fileExistsInRepo(octokit, owner, repo, path, branch) {
205
205
206
206
async function createCommit ( octokit , owner , repo , message , tree , baseTree ) {
207
207
return (
208
- await octokit . git . createCommit ( {
208
+ await octokit . rest . git . createCommit ( {
209
209
owner,
210
210
repo,
211
211
message,
@@ -217,7 +217,7 @@ async function createCommit(octokit, owner, repo, message, tree, baseTree) {
217
217
218
218
async function createTree ( octokit , owner , repo , treeItems , baseTree ) {
219
219
return (
220
- await octokit . git . createTree ( {
220
+ await octokit . rest . git . createTree ( {
221
221
owner,
222
222
repo,
223
223
tree : treeItems ,
@@ -231,7 +231,7 @@ async function createBlob(octokit, owner, repo, contents, type) {
231
231
return contents ;
232
232
} else {
233
233
const file = (
234
- await octokit . git . createBlob ( {
234
+ await octokit . rest . git . createBlob ( {
235
235
owner,
236
236
repo,
237
237
content : Buffer . from ( contents ) . toString ( "base64" ) ,
@@ -244,7 +244,7 @@ async function createBlob(octokit, owner, repo, contents, type) {
244
244
245
245
async function loadRef ( octokit , owner , repo , ref ) {
246
246
try {
247
- const x = await octokit . git . getRef ( {
247
+ const x = await octokit . rest . git . getRef ( {
248
248
owner,
249
249
repo,
250
250
ref : `heads/${ ref } `
0 commit comments