Skip to content

Commit

Permalink
Merge pull request #2912 from uselagoon/fix-pullrequests-check
Browse files Browse the repository at this point in the history
fix: populate pullrequests not branches
  • Loading branch information
shreddedbacon authored Nov 4, 2021
2 parents 60c93fb + f8943c5 commit 568a2b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions node-packages/commons/src/deploy-tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ export const deployTargetPullrequest = async function(data: any) {
for (let i = 0; i < deployTargetConfigs.targets.length; i++) {
deployTarget = {
openshiftProjectPattern: deployTargetConfigs.targets[i].deployTargetProjectPattern,
branches: deployTargetConfigs.targets[i].branches,
pullrequests: deployTargetConfigs.targets[i].pullrequests,
// since deploytarget configs reference a deploytarget instead of an openshift, convert that here to be what it needs to be
openshift: deployTargetConfigs.targets[i].deployTarget
}
Expand All @@ -368,7 +368,7 @@ export const deployTargetPullrequest = async function(data: any) {
const projectOpenshift = await getOpenShiftInfoForProject(projectName);
deployTarget = {
openshiftProjectPattern: projectOpenshift.project.openshiftProjectPattern,
branches: projectOpenshift.project.branches,
pullrequests: projectOpenshift.project.pullrequests,
openshift: projectOpenshift.project.openshift
}
} catch (err) {
Expand Down
6 changes: 2 additions & 4 deletions node-packages/commons/src/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,7 @@ export const createDeployTask = async function(deployData: any) {
.filter(e => e.environmentType === 'production')
.map(e => e.name);
logger.debug(
`projectName: ${projectName}, branchName: ${branchName}, existing environments are `,
prod_environments
`projectName: ${projectName}, branchName: ${branchName}, existing environments are ${prod_environments}`
);

if (prod_environments.length >= productionEnvironmentsLimit) {
Expand All @@ -573,8 +572,7 @@ export const createDeployTask = async function(deployData: any) {
.filter(e => e.environmentType === 'development')
.map(e => e.name);
logger.debug(
`projectName: ${projectName}, branchName: ${branchName}, existing environments are `,
dev_environments
`projectName: ${projectName}, branchName: ${branchName}, existing environments are ${dev_environments}`
);

if (
Expand Down

0 comments on commit 568a2b9

Please sign in to comment.