async function escalateIncident(incidentId, email) {
  const chosenLevel = await ux.prompt(escalatePrompt)
  const escalatePayload = {
    incident: {
      type: 'incident_reference',
      escalation_level: chosenLevel.level,
    },
  }

  await ux.spinner.start(
    `⬆️  Escalating incident ${incidentId} to level ${chosenLevel.level}`
  )
  await pd.updateIncident(incidentId, email, escalatePayload)
  await ux.spinner.stop(
    `✅  Incident ${incidentId} has been escalated to level ${chosenLevel.level}`
  )
}
/**
 * escalateIncident causes the current user to escalate an incident to the chosen level.
 *
 * @param {string} incidentId The id of the incident to resolve
 * @param {string} email      The current user's email
 */
escalateIncident causes the current user to escalate an incident to the chosen level.
@param {string} incidentId The id of the incident to resolve
@param {string} email      The current user's email
escalateIncident causes the current user to escalate an incident to the chosen level . @param { string } incidentId The id of the incident to resolve @param { string } email The current user ' s email
async function escalateIncident(incidentId, email) {
  const chosenLevel = await ux.prompt(escalatePrompt)
  const escalatePayload = {
    incident: {
      type: 'incident_reference',
      escalation_level: chosenLevel.level,
    },
  }
  await ux.spinner.start(
    `⬆️  Escalating incident ${incidentId} to level ${chosenLevel.level}`
  )
  await pd.updateIncident(incidentId, email, escalatePayload)
  await ux.spinner.stop(
    `✅  Incident ${incidentId} has been escalated to level ${chosenLevel.level}`
  )
}
async function escalateIncident ( incidentId , email ) { const chosenLevel = await ux . prompt ( escalatePrompt ) const escalatePayload = { incident : { type : 'incident_reference' , escalation_level : chosenLevel . level , } , } await ux . spinner . start ( ` ci dentId} to os enLevel.lev e l}` ) await pd . updateIncident ( incidentId , email , escalatePayload ) await ux . spinner . stop ( ` in cidentId}  h ch osenLevel.l e vel}` ) }
escalateIncident causes the current user to escalate an incident to the chosen level.
escalateIncident causes the current user to escalate an incident to the chosen level .