message: chore: fix the pullrequests value being passed to existing environments that prevented them from being deployed. fix some styling/formatting
diff: @@ -109,7 +109,7 @@ const deployBranch = async function(data: any) {
  /*
  this function handles deploying a pullrequest
  */
  -const deployPullrquest = async function(data: any) {
  +const deployPullrequest = async function(data: any) {
  const {
  projectId,
  projectName,
  @@ -315,7 +315,13 @@ export const deployTargetPullrequest = async function(data: any) {
  const environmentOpenshift = await getOpenShiftInfoForEnvironment(envId);
  deployTarget = {
  openshiftProjectPattern: environmentOpenshift.environment.openshiftProjectPattern,
  - pullrequests: branchName,
  + /*
  + this `pullrequests: branchName,` breaks deploying an existing environment as it makes the pullrequest
  + attempt to do a regex check that fails. so just don't do it, the environment already exists so
  + just don't set pullrequests so it sends as a null value and just deploys the environment again without
  + testing any regex
  + // pullrequests: branchName,
  + */
  openshift: environmentOpenshift.environment.openshift
  }
  } catch (err) {
  @@ -324,7 +330,7 @@ export const deployTargetPullrequest = async function(data: any) {
  // if there is an openshift attached to the environment, then deploy deploy the environment using this deploytarget
  if (deployTarget) {
  data.deployTarget = deployTarget
  - let deploy = await deployPullrquest(data)
  + let deploy = await deployPullrequest(data)
  // EXISTING DEPLOY VIA ENVIRONMENT OPENSHIFT
  return deploy
  }
  @@ -344,7 +350,7 @@ export const deployTargetPullrequest = async function(data: any) {
  }
  data.deployTarget = deployTarget
  // NEW DEPLOY VIA DEPLOYTARGETCONFIG OPENSHIFT
  - deploy = await deployPullrquest(data)
  + deploy = await deployPullrequest(data)
  if (deploy) {
  // if the deploy is successful, then return
  return deploy
  @@ -369,7 +375,7 @@ export const deployTargetPullrequest = async function(data: any) {
  //do nothing if there is an error, likely means that the environment hasn't been deployed before
  }
  data.deployTarget = deployTarget
  - let deploy = await deployPullrquest(data)
  + let deploy = await deployPullrequest(data)
  // NEW DEPLOY VIA PROJECT OPENSHIFT
  return deploy
  }
  