MCPcopy Create free account
hub / github.com/apache/datafusion / get_required_checks

Function get_required_checks

ci/scripts/check_asf_yaml_status_checks.py:36–50  ·  view source on GitHub ↗

Extract all required_status_checks contexts from .asf.yaml.

(asf_yaml_path)

Source from the content-addressed store, hash-verified

34
35
36def get_required_checks(asf_yaml_path):
37 """Extract all required_status_checks contexts from .asf.yaml."""
38 with open(asf_yaml_path) as f:
39 config = yaml.safe_load(f)
40
41 checks = {} # context -> list of branches requiring it
42 branches = config.get("github", {}).get("protected_branches", {})
43 for branch, settings in branches.items():
44 contexts = (
45 settings.get("required_status_checks", {}).get("contexts", [])
46 )
47 for ctx in contexts:
48 checks.setdefault(ctx, []).append(branch)
49
50 return checks
51
52
53def get_workflow_jobs(workflows_dir):

Callers 1

mainFunction · 0.85

Calls 3

getMethod · 0.45
itemsMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…