Skip to content

Commit b259845

Browse files
committedJul 29, 2016
Merge branch 'wilsaj-github-api-v2.3.0' into gh-pages
2 parents 5a634a9 + 8b2c48c commit b259845

File tree

4 files changed

+30
-28
lines changed

4 files changed

+30
-28
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"dependencies": {
3131
"ampersand-state": "^5.0.0",
3232
"bootstrap": "^3.3.6",
33-
"github-api": "github:michael/github#849e058",
33+
"github-api": "^2.3.0",
3434
"jquery-deparam": "^0.5.2",
3535
"jquery-serializejson": "^2.6.2",
3636
"js-cookie": "^2.1.0",

‎scripts/dist/bundle.js

+25-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎scripts/src/models/file.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default State.extend({
3232
},
3333
read: function () {
3434
return new Promise((resolve, reject) => {
35-
this.repo.read(this.repoBranch, this.filePath, (err, contents) => {
35+
this.repo.getContents(this.repoBranch, this.filePath, (err, contents) => {
3636
if (err) reject(err)
3737
else resolve(contents)
3838
})
@@ -41,15 +41,15 @@ export default State.extend({
4141
save: function (contents, commitMsg) {
4242
return new Promise((resolve, reject) => {
4343
if (!commitMsg) commitMsg = `Updated ${this.fileName}`
44-
this.repo.write(this.repoBranch, this.filePath, contents, commitMsg, {}, (err, data) => {
44+
this.repo.writeFile(this.repoBranch, this.filePath, contents, commitMsg, {}, (err, data) => {
4545
if (err) reject(err)
4646
else resolve(data)
4747
})
4848
})
4949
},
5050
remove: function () {
5151
return new Promise((resolve, reject) => {
52-
this.repo.remove(this.repoBranch, this.filePath, (err, data) => {
52+
this.repo.deleteFile(this.repoBranch, this.filePath, (err, data) => {
5353
if (err) reject(err)
5454
else resolve(data)
5555
})

‎scripts/src/models/user.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default State.extend({
7575
auth: 'oauth'
7676
})
7777
const user = github.getUser()
78-
user.show(null, (err, userData) => {
78+
user.getProfile((err, userData) => {
7979
if (err) reject(err)
8080
else resolve(userData)
8181
})

0 commit comments

Comments
 (0)
Failed to load comments.