function renderBuildStatusBadge({ label, status }) {
  let message
  let color
  if (greenStatuses.includes(status)) {
    message = 'passing'
    color = 'brightgreen'
  } else if (orangeStatuses.includes(status)) {
    message = status === 'partially succeeded' ? 'passing' : status
    color = 'orange'
  } else if (redStatuses.includes(status)) {
    message = status === 'failed' ? 'failing' : status
    color = 'red'
  } else {
    message = status
  }
  return {
    label,
    message,
    color,
  }
}
Handles rendering concerns of badges that display build status.
Determines the message and color of the badge according to the build status.

@param {object} attrs Refer to individual attributes
@param {string} [attrs.label] If provided then badge label is set to this value
@param {string} attrs.status Build status
@returns {object} Badge with label, message and color properties