Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions configs/.env
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ GITHUB_DEPLOY_KEY_BITS=2048
GITHUB_DEPLOY_KEYS_POOL_SIZE=10
GITHUB_HOOK_NAME=web
GITHUB_HOOK_SECRET=3V3RYTHINGisAW3S0ME!
GITHUB_HOST=github.com
GITHUB_PROXY_EXPIRATION=3600
GITHUB_SCOPE=user:email,read:org,repo,repo_deployment,read:repo_hook,repo:status
GITHUB_URL=https://github.com
HASHIDS_LENGTH=6
HASHIDS_SALT=VvCCYj8x3xaHs44QiDp9
HELLO_RUNNABLE_GITHUB_ID=10224339
Expand Down
2 changes: 1 addition & 1 deletion lib/models/apis/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ Docker.prototype._createImageBuilderEnv = function (opts) {
const commitishs = []
const deployKeys = []
contextVersion.appCodeVersions.forEach(function (acv) {
repoUrls.push(`git@${process.env.GITHUB_HOST}:${acv.repo}`)
repoUrls.push('git@github.com:' + acv.repo)
// use either a commit, branch, or default to master
commitishs.push(acv.commit || acv.branch || 'master')
if (acv.privateKey) {
Expand Down
2 changes: 1 addition & 1 deletion lib/routes/actions/redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ app.get('/actions/redirect',
return res.status(404).end()
}
var url = decodeURIComponent(req.query.url)
if (url.indexOf(process.env.GITHUB_URL) !== 0) {
if (url.indexOf('https://github.com/') !== 0) {
return res.status(404).end()
}
res.redirect(302, url)
Expand Down
4 changes: 2 additions & 2 deletions lib/routes/contexts/versions/app-code-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ app.post('/contexts/:contextId/versions/:versionId/appCodeVersions/:appCodeVersi
optimus.transform(
{
// optimus does not assume that it is coming from github should it?
repo: `git@${process.env.GITHUB_HOST}:${appCodeVersion.repo}`,
repo: 'git@github.com:' + appCodeVersion.repo,
commitish: appCodeVersion.commit,
rules: rules,
deployKey: appCodeVersion.privateKey
Expand Down Expand Up @@ -268,7 +268,7 @@ app.post('/contexts/:contextId/versions/:versionId/appCodeVersions/:appCodeVersi
// Ask optimus for the results...
optimus.transform(
{
repo: `git@${process.env.GITHUB_HOST}:${appCodeVersion.repo}`,
repo: 'git@github.com:' + appCodeVersion.repo,
commitish: appCodeVersion.commit,
rules: rules,
deployKey: appCodeVersion.privateKey
Expand Down
3 changes: 2 additions & 1 deletion lib/routes/github/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ var cacheOmitHeaders = [
].concat(corsHeaders)

var proxy = httpProxy.createProxy({
target: 'http://' + process.env.GITHUB_VARNISH_HOST + ':' + process.env.GITHUB_VARNISH_PORT,
target: 'https://api.github.com',
// github wants these headers
headers: {
host: 'api.github.com',
accept: 'application/vnd.github.v3+json'
}
})
Expand Down