export function toIssue()

in src/ui/utils/gitlab_utils.js [61:78]


export function toIssue(issue, { projectId } = {}) {
  const { iid, title, state } = issue;

  const webUrl = issue.webUrl || issue.web_url;
  const { projectPath } = parseIssueUrl(webUrl);

  return {
    iid,
    title,
    state,
    webUrl,
    projectId,
    projectPath,
    fullReference: issue.reference
      ? `${projectPath}${issue.reference}`
      : (issue.references || {}).full,
  };
}