Skip to content

Commit abe159c

Browse files
Use the reference branch to get files
Previously, the first available branch was used, which is counter-intutive to the user. Files should be retrieved from the branch referenced in the current build. Fixes #10
1 parent cdb1d16 commit abe159c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/webapp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module.exports = {
3939

4040
getFile: function (filename, ref, account, config, project, done){
4141
var repo_id = project.provider.repo_id,
42-
branch = project.branches[0].name;
42+
branch = ref.branch;
4343

4444
var uri = util.format("projects/%d/repository/blobs/%s?filepath=%s", repo_id, branch, filename);
4545

0 commit comments

Comments
 (0)