Honor inherited flow dependencies and batch exact rename scope
This commit is contained in:
parent
1e17f1133c
commit
4292a5078a
4 changed files with 56 additions and 1 deletions
|
|
@ -25,6 +25,12 @@ def field(block, key):
|
|||
return m.group(1).strip().strip('"') if m else ""
|
||||
|
||||
|
||||
def dependencies(block):
|
||||
# Accept the convention's inline lists and YAML's indented multiline lists.
|
||||
m = re.search(r"^depends_on:[ \t]*(.*(?:\n[ \t]+[^\n]*)*)", block, re.M)
|
||||
return re.findall(r"[A-Z][A-Z0-9-]+-T\d+|[A-Z][A-Z0-9-]+-WP-\d+", m[1]) if m else []
|
||||
|
||||
|
||||
def load(root, repos):
|
||||
tasks, wps = {}, {}
|
||||
for r in repos:
|
||||
|
|
@ -38,7 +44,7 @@ def load(root, repos):
|
|||
tid = field(b, "id")
|
||||
if not tid:
|
||||
continue
|
||||
deps = re.findall(r"[A-Z][A-Z0-9-]+-T\d+|[A-Z][A-Z0-9-]+-WP-\d+", field(b, "depends_on"))
|
||||
deps = list(dict.fromkeys(dependencies(fm) + dependencies(b)))
|
||||
tasks[tid] = {"id": tid, "status": field(b, "status"), "deps": deps,
|
||||
"human": field(b, "needs_human") == "true",
|
||||
"blocked_on": field(b, "blocked_on"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue