This flowchart describes the logic for managing the CICD label in Cocoon for running presubmit CI.
@startuml state PR { state Waiting Waiting : entry / Create Awaiting Check Run Waiting : exit / resolve(awaiting check) state Running Running: entry/ Start Presubmits state if_priv2 <<choice>> Running --> if_priv2: onPushed if_priv2 --> Running: isPrivileged && labeled(CICD) if_priv2 --> Waiting : default: remove(CICD) state if_draft <<choice>> PR --> if_draft: openned if_draft --> Waiting : isDraft if_draft --> Running: isPrivileged if_draft --> Waiting : default Waiting --> Running: labeled(CICD) } @enduml