1- module . exports = function ( octokit , opts ) {
1+ module . exports = function ( octokit , opts ) {
22 return new Promise ( async ( resolve , reject ) => {
33 // Up front validation
44 try {
@@ -19,7 +19,7 @@ module.exports = function (octokit, opts) {
1919 base,
2020 branch : branchName ,
2121 createBranch,
22- changes,
22+ changes
2323 } = opts ;
2424
2525 let branchAlreadyExists = true ;
@@ -43,7 +43,7 @@ module.exports = function (octokit, opts) {
4343 base = (
4444 await octokit . repos . get ( {
4545 owner,
46- repo,
46+ repo
4747 } )
4848 ) . data . default_branch ;
4949 }
@@ -100,7 +100,7 @@ module.exports = function (octokit, opts) {
100100 path : fileName ,
101101 sha : null , // sha as null implies that the file should be deleted
102102 mode : "100644" ,
103- type : "commit" ,
103+ type : "commit"
104104 } ) ;
105105 }
106106 }
@@ -129,7 +129,7 @@ module.exports = function (octokit, opts) {
129129 path : fileName ,
130130 sha : fileSha ,
131131 mode : mode ,
132- type : type ,
132+ type : type
133133 } ) ;
134134 }
135135
@@ -176,7 +176,7 @@ module.exports = function (octokit, opts) {
176176 repo,
177177 force : true ,
178178 ref : `${ updateRefBase } heads/${ branchName } ` ,
179- sha : baseTree ,
179+ sha : baseTree
180180 } ) ;
181181
182182 // Return the new branch name so that we can use it later
@@ -195,7 +195,7 @@ async function fileExistsInRepo(octokit, owner, repo, path, branch) {
195195 owner,
196196 repo,
197197 path,
198- ref : branch ,
198+ ref : branch
199199 } ) ;
200200 return true ;
201201 } catch ( e ) {
@@ -210,7 +210,7 @@ async function createCommit(octokit, owner, repo, message, tree, baseTree) {
210210 repo,
211211 message,
212212 tree : tree . sha ,
213- parents : [ baseTree ] ,
213+ parents : [ baseTree ]
214214 } )
215215 ) . data ;
216216}
@@ -221,7 +221,7 @@ async function createTree(octokit, owner, repo, treeItems, baseTree) {
221221 owner,
222222 repo,
223223 tree : treeItems ,
224- base_tree : baseTree ,
224+ base_tree : baseTree
225225 } )
226226 ) . data ;
227227}
@@ -235,7 +235,7 @@ async function createBlob(octokit, owner, repo, contents, type) {
235235 owner,
236236 repo,
237237 content : Buffer . from ( contents ) . toString ( "base64" ) ,
238- encoding : "base64" ,
238+ encoding : "base64"
239239 } )
240240 ) . data ;
241241 return file . sha ;
@@ -247,7 +247,7 @@ async function loadRef(octokit, owner, repo, ref) {
247247 const x = await octokit . git . getRef ( {
248248 owner,
249249 repo,
250- ref : `heads/${ ref } ` ,
250+ ref : `heads/${ ref } `
251251 } ) ;
252252 return x . data . object . sha ;
253253 } catch ( e ) {
0 commit comments