File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1414from packaging .version import Version
1515
1616CI_TARGETS_YAML = "ci-targets.yaml"
17+ CI_SKIP_LABELS = ["ci:skip" , "documentation" ]
1718
1819
1920def meets_conditional_version (version : str , min_version : str ) -> bool :
@@ -31,12 +32,20 @@ def parse_labels(labels: Optional[str]) -> dict[str, set[str]]:
3132 "build" : set (),
3233 "arch" : set (),
3334 "libc" : set (),
35+ "directives" : set (),
3436 }
3537
3638 for label in labels .split ("," ):
3739 label = label .strip ()
40+
41+ # Handle special directive labels
42+ if label in CI_SKIP_LABELS :
43+ result ["directives" ].add ("skip" )
44+ continue
45+
3846 if not label or ":" not in label :
3947 continue
48+
4049 category , value = label .split (":" , 1 )
4150 if category in result :
4251 result [category ].add (value )
@@ -46,6 +55,9 @@ def parse_labels(labels: Optional[str]) -> dict[str, set[str]]:
4655
4756def should_include_entry (entry : dict [str , str ], filters : dict [str , set [str ]]) -> bool :
4857 """Check if an entry satisfies the label filters."""
58+ if filters .get ("directives" ) and "skip" in filters ["directives" ]:
59+ return False
60+
4961 if filters .get ("platform" ) and entry ["platform" ] not in filters ["platform" ]:
5062 return False
5163
You can’t perform that action at this time.
0 commit comments