diff --git a/changelog.d/20251114_110537_kp2681_scrt_6053_enforce_ignore_reason_for_invalid_state_to_test_credential.md b/changelog.d/20251114_110537_kp2681_scrt_6053_enforce_ignore_reason_for_invalid_state_to_test_credential.md new file mode 100644 index 00000000..872bece3 --- /dev/null +++ b/changelog.d/20251114_110537_kp2681_scrt_6053_enforce_ignore_reason_for_invalid_state_to_test_credential.md @@ -0,0 +1,41 @@ + + + + + + + +### Fixed + +- Added missing "invalid" ignore_reason. + + diff --git a/pygitguardian/models.py b/pygitguardian/models.py index c33f9ac1..6bfade23 100644 --- a/pygitguardian/models.py +++ b/pygitguardian/models.py @@ -917,7 +917,7 @@ class Detector(Base, FromDictMixin): "SENSITIVE_FILE", "TEST_FILE", ] -IgnoreReason = Literal["test_credential", "false_positive", "low_risk"] +IgnoreReason = Literal["test_credential", "false_positive", "low_risk", "invalid"] OccurrenceKind = Literal["realtime", "historical"] OccurrencePresence = Literal["present", "removed"] Visibility = Literal["private", "internal", "public"] diff --git a/tests/test_models.py b/tests/test_models.py index 12d9d92d..3bc87e93 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -311,7 +311,7 @@ def test_document_handle_surrogates(self): "in_vcs": 3, "removed_in_vcs": 0, }, - "ignore_reason": "test_credential", + "ignore_reason": "invalid", "triggered_at": "2019-05-12T09:37:49Z", "ignored_at": "2019-08-24T14:15:22Z", "ignorer_id": 309,