Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #9 from ooga/bugfix-file-not-present-on-master
Browse files Browse the repository at this point in the history
Use dynamic branch name for Github API
  • Loading branch information
schme16 committed Sep 12, 2016
2 parents 248864d + 539139f commit 8b65bb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function repoFunc (req, res) {
meta.filePath = meta.raw.join('/');

/*Set the */
options.url = 'https://api.github.com/' + (meta.gist ? 'gists' : 'repos') + '/' + (meta.gist ? '' : meta.user + '/') + meta.repo + (meta.gist ? '' : '/commits/master?client_id=1f21f89a93c52a69cfcd&client_secret=3036adac62bee3029424210d8a7cdd85ab79cd36');
options.url = 'https://api.github.com/' + (meta.gist ? 'gists' : 'repos') + '/' + (meta.gist ? '' : meta.user + '/') + meta.repo + (meta.gist ? '' : '/commits/' + meta.branch + '?client_id=1f21f89a93c52a69cfcd&client_secret=3036adac62bee3029424210d8a7cdd85ab79cd36');

/*if the repo is cached, just send that back, and update it for next time*/
if (cache[meta.user + '/' + meta.repo]) {
Expand Down

1 comment on commit 8b65bb5

@TYoung86
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

related to #10 ?

Please sign in to comment.