Adjust CoT verification for new action and cron roles - #823
Conversation
The action repo roles are changing to include the level. We need to account for that in CoT.
Cron tasks can now run against specific Git branches, so we can't just assume they're running on the default branch anymore.
8f50612 to
d2f0468
Compare
|
I somewhat tested this here: Which is using this PR. In this case the associated fxci-config PR hasn't landed yet, so the CoT error is exactly as expected:
|
|
The failures are in |
| if branch["name"] == default_branch: | ||
| return str(branch["level"]) | ||
| if branch is None: | ||
| branch = config.get("default_branch", "main") |
There was a problem hiding this comment.
I feel like we should crash if a default_branch is not set on the repo.
No need to fix this here, we can fix this in the future.
| branch = config.get("default_branch", "main") | ||
| for b in config["branches"]: | ||
| if fnmatch.fnmatch(branch, b["name"]): | ||
| return str(b["level"]) |
There was a problem hiding this comment.
nit: I got a bit confused at first glance here. b variable (b["foo"]) vs byte-string (b"foo")
|
I think we're going to try to fix this in a backwards compatible way.. But I think we'll still likely want this in the future. Marking back as draft for now. |
No description provided.