Skip to content

Commit

Permalink
FIX: create ci section if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Oct 29, 2024
1 parent cee4849 commit 215fb49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compwa_policy/check_dev_files/precommit.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _update_precommit_ci_skip(precommit: ModifiablePrecommit) -> None:
non_functional_hooks = get_non_functional_hooks(precommit.document)
expected_skips = sorted(set(non_functional_hooks) | set(local_hooks))
existing_skips = precommit_ci.get("skip")
if existing_skips and existing_skips != expected_skips:
if existing_skips != expected_skips:
precommit_ci["skip"] = sorted(expected_skips)
yaml_config = cast(CommentedMap, precommit.document)
yaml_config.yaml_set_comment_before_after_key("repos", before="\n")
Expand Down

0 comments on commit 215fb49

Please sign in to comment.