Skip to content

Commit

Permalink
Merge pull request #2042 from CodeNow/ASAP-fix-unique-check
Browse files Browse the repository at this point in the history
FINAL fix for multi-hook
  • Loading branch information
Nathan219 authored Jul 6, 2017
2 parents 9b68521 + 5a54902 commit ddc0866
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions configs/.env
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ GITHUB_DEPLOY_KEYS_POOL_SIZE=10
GITHUB_HOOK_NAME=web
GITHUB_HOOK_SECRET=3V3RYTHINGisAW3S0ME!
GITHUB_HOST=github.com
GITHUB_HOST_FOR_OCTOBEAR=github.com
GITHUB_PROXY_EXPIRATION=3600
GITHUB_SCOPE=user:email,read:org,repo,repo_deployment,read:repo_hook,repo:status
GITHUB_SUPER_SCOPE=user:email,read:org,repo,repo_deployment,read:repo_hook,repo:status,write:public_key
Expand Down
4 changes: 2 additions & 2 deletions lib/models/services/cluster-config-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ module.exports = class ClusterConfigService {
ownerUsername: GitHub.getOrgFromFullRepoName(repoFullName),
userContentDomain: process.env.USER_CONTENT_DOMAIN,
dockerComposeFilePath: rootFilePath,
scmDomain: process.env.GITHUB_HOST
scmDomain: process.env.GITHUB_HOST_FOR_OCTOBEAR
}
return octobear.parseAndMergeMultiple(opts, composeFilesContents)
.then(parsedResult => {
Expand Down Expand Up @@ -1815,7 +1815,7 @@ module.exports = class ClusterConfigService {

return {
builds: ClusterConfigService._uniquePathReduce(builds, 'build.dockerFilePath'),
externals: ClusterConfigService._uniquePathReduce(externals, 'repo')
externals: ClusterConfigService._uniquePathReduce(externals, 'code.repo')
}
}
}
12 changes: 9 additions & 3 deletions unit/models/services/cluster-config-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -3039,13 +3039,19 @@ describe('Cluster Config Service Unit Tests', function () {
},
externals: {
github: {
repo: 'user/externalRepo'
code: {
repo: 'user/externalRepo'
}
},
anotherTest: {
repo: 'user/testRepo'
code: {
repo: 'user/testRepo'
}
},
andAnotherTest: {
repo: 'user/testRepo'
code: {
repo: 'user/testRepo'
}
}
}
}
Expand Down

0 comments on commit ddc0866

Please sign in to comment.