INNER CODE UNIT · Python
job_unit
wolfSSL/wolfssl-examples · .github/scripts/ci_triage.py:264
def job_unit(name):
"""`esp32 / Build / ESP32 (...) wolfSSL master` -> ('esp32', 'master').
The prefix is nightly.yml's job name, which is deliberately the target name
and therefore the ci:<target> label.
"""
if " / " not in name:
return None, None
target, rest = name.split(" / ", 1)
if target.lower() in HOST_JOBS:
return None, None
m = REF_RE.search(rest)
return target, (m.group(1) or m.group(2)) if m else "unknown"
HOST_JOB_RE = re.compile(r"^host / (?:Run|Build) / (.+) \((.+)\)$", re.I)