<commit_before>import React from 'react';
import * as R from 'ramda';
import css from 'styled-jsx/css';
import EnvironmentLink from 'components/link/Environment';
import Box from 'components/style/Box';
import { bp, color, fontSize } from 'lib/variables';

const bgImages = {
  branch: {
    normal: "url('/static/images/environment-branch.svg')",
    hover: "url('/static/images/environment-branch-hover.svg')"
  },
  pullrequest: {
    normal: "url('/static/images/environment-pull-request.svg')",
    hover: "url('/static/images/environment-pull-request-hover.svg')"
  },
  none: {
    normal: 'none',
    hover: 'none'
  }
};

const { className: boxClassName, styles: boxStyles } = css.resolve`
  .box {
    margin-bottom: 46px;

    .content {
      background-position: right 32px bottom -6px;
      background-repeat: no-repeat;
      background-size: 40px 50px;
      min-height: 122px;
      padding: 19px 20px;
    }
  }
`;

const Environments = ({ environments = [] }) => {
  if (environments.length === 0) {
    return null;
  }

  return (
    <div className="environments">
      {environments.map(environment => {
        const bgImage = R.propOr(
          bgImages.none,
          environment.deployType,
          bgImages
        );
        const { className: bgClassName, styles: bgStyles } = css.resolve`
          .content {
            background-image: ${bgImage.normal};

            &:hover {
              background-image: ${bgImage.hover};
            }
          }
        `;

        return (
          <div className="environment" key={environment.id}>
            <EnvironmentLink
              environmentSlug={environment.openshiftProjectName}
              projectSlug={environment.project.name}
            >
              <Box className={`${boxClassName} ${bgClassName}`}>
                {environment.environmentType == 'production' && (
                  <div className="productionLabel">
                    <span>Production</span>
                  </div>
                )}
                <label>
                  {environment.deployType === 'branch'
                    ? environment.deployType
                    : 'PR'}
                </label>
                <h4>{environment.name}</h4>
              </Box><commit_msg>Promote environment wasn't marked as such on environments page<commit_after>import React from 'react';
import * as R from 'ramda';
import css from 'styled-jsx/css';
import EnvironmentLink from 'components/link/Environment';
import Box from 'components/style/Box';
import { bp, color, fontSize } from 'lib/variables';

const bgImages = {
  branch: {
    normal: "url('/static/images/environment-branch.svg')",
    hover: "url('/static/images/environment-branch-hover.svg')"
  },
  pullrequest: {
    normal: "url('/static/images/environment-pull-request.svg')",
    hover: "url('/static/images/environment-pull-request-hover.svg')"
  },
  none: {
    normal: 'none',
    hover: 'none'
  }
};

const { className: boxClassName, styles: boxStyles } = css.resolve`
  .box {
    margin-bottom: 46px;

    .content {
      background-position: right 32px bottom -6px;
      background-repeat: no-repeat;
      background-size: 40px 50px;
      min-height: 122px;
      padding: 19px 20px;
    }
  }
`;

const Environments = ({ environments = [] }) => {
  if (environments.length === 0) {
    return null;
  }

  return (
    <div className="environments">
      {environments.map(environment => {
        const bgImage = R.propOr(
          bgImages.none,
          environment.deployType,
          bgImages
        );
        const { className: bgClassName, styles: bgStyles } = css.resolve`
          .content {
            background-image: ${bgImage.normal};

            &:hover {
              background-image: ${bgImage.hover};
            }
          }
        `;

        return (
          <div className="environment" key={environment.id}>
            <EnvironmentLink
              environmentSlug={environment.openshiftProjectName}
              projectSlug={environment.project.name}
            >
              <Box className={`${boxClassName} ${bgClassName}`}>
                {environment.environmentType == 'production' && (
                  <div className="productionLabel">
                    <span>Production</span>
                  </div>
                )}
                <label>
                  {environment.deployType === 'pullrequest'
                    ? 'PR'
                    : environment.deployType}
                </label>
                <h4>{environment.name}</h4>
              </Box>
{'fraction_non_alphanumeric': 0.1321288637353069, 'fraction_numerical': 0.00827165868524162, 'mean_word_length': 1.9587894397939472, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4619757', 'n_tokens_mistral': 1321, 'n_tokens_neox': 1247, 'n_words': 253}