docstr: Get a list of all CI jobs (GitHub Actions and other) in a unified format
docstr_tok: ["Get","a","list","of","all","CI","jobs","(","GitHub","Actions","and","other",")","in","a","unified","format"]
code: def ci_jobs(self) -> List[CIJob]:
      """
      Get a list of all CI jobs (GitHub Actions and other) in a unified format
      """
      jobs = []
      for item in self.head_commit()["statusCheckRollup"]["contexts"][
          "nodes"
      ]:
          if "checkSuite" in item:
              # GitHub Actions job, parse separately
              status = item["conclusion"]
              if status is None:
                  # If the 'conclusion' isn't filled out the job hasn't
                  # finished yet
                  status = "PENDING"
              workflow_name = item["checkSuite"]["workflowRun"][
                  "workflow"
              ]["name"]
              if workflow_name != "CI":
                  # Ignore all jobs that aren't in the main.yml workflow (these are mostly
                  # automation jobs that run on PRs for tagging / reviews)
                  continue
              check_name = item["name"]
              jobs.append(
                  {
                      "name": f"{workflow_name} / {check_name}",
                      "url": item["url"],
                      "status": status.upper(),
                  }
              )
          else:
              # GitHub Status (e.g. from Jenkins)
              jobs.append(
                  {
                      "name": item["context"],
                      "url": item["targetUrl"],
                      "status": item["state"].upper(),
                  }
              )
  
      logging.info(
          f"Found CI jobs for {self.head_commit()['oid']} {to_json_str(jobs)}"
      )
      return jobs
  
imports: import os
  import json
  import argparse
  import sys
  import warnings
  import logging
  import traceback
  import re
  from typing import Dict, Any, List, Optional, Callable, Union
  from pathlib import Path
  from git_utils import git, GitHubRepo, parse_remote, post
  from cmd_utils import init_log
label_desc: Use image node_id 7 for calling the PR obj's underlying member method code with example usage: obj.ci_jobs() and returns: jobs