def _ParseIssueReferences(issue_ref_list):
  """Parses a list of issue references into a tuple of IDs added/removed.

  For example: [ "alpha:7", "beta:8", "-gamma:9" ] => ([ "7", "8" ], [ "9" ])

  NOTE: We don't support cross-project issue references. Rather we
  just assume the issue reference is within the same project.
  """
  added = []
  removed = []
  for proj in issue_ref_list:
    parts = proj.split(":")
    proj_id = parts[1] if len(parts) >= 2 else proj[1:]
    if proj[0] != "-":
      added.append(proj_id)
    else:
      removed.append(proj_id)
  return added, removed