Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: populate pullrequests not branches #2912

Merged
merged 1 commit into from
Nov 4, 2021
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
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