Skip to content

Commit

Permalink
update to github-api version 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsaj committed Jul 29, 2016
1 parent 731a672 commit 04ed383
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 28 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"ampersand-state": "^5.0.0",
"bootstrap": "^3.3.6",
"github-api": "github:michael/github#849e058",
"github-api": "^2.3.0",
"jquery-deparam": "^0.5.2",
"jquery-serializejson": "^2.6.2",
"js-cookie": "^2.1.0",
Expand Down
48 changes: 25 additions & 23 deletions scripts/dist/bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions scripts/src/models/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default State.extend({
},
read: function () {
return new Promise((resolve, reject) => {
this.repo.read(this.repoBranch, this.filePath, (err, contents) => {
this.repo.getContents(this.repoBranch, this.filePath, (err, contents) => {
if (err) reject(err)
else resolve(contents)
})
Expand All @@ -41,15 +41,15 @@ export default State.extend({
save: function (contents, commitMsg) {
return new Promise((resolve, reject) => {
if (!commitMsg) commitMsg = `Updated ${this.fileName}`
this.repo.write(this.repoBranch, this.filePath, contents, commitMsg, {}, (err, data) => {
this.repo.writeFile(this.repoBranch, this.filePath, contents, commitMsg, {}, (err, data) => {
if (err) reject(err)
else resolve(data)
})
})
},
remove: function () {
return new Promise((resolve, reject) => {
this.repo.remove(this.repoBranch, this.filePath, (err, data) => {
this.repo.deleteFile(this.repoBranch, this.filePath, (err, data) => {
if (err) reject(err)
else resolve(data)
})
Expand Down
2 changes: 1 addition & 1 deletion scripts/src/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default State.extend({
auth: 'oauth'
})
const user = github.getUser()
user.show(null, (err, userData) => {
user.getProfile((err, userData) => {
if (err) reject(err)
else resolve(userData)
})
Expand Down

0 comments on commit 04ed383

Please sign in to comment.