feat(jira): add color for manual status (#8642)

This commit is contained in:
Pedro Martín
2025-09-03 16:53:31 +02:00
committed by GitHub
parent 088a6bcbda
commit 1fc12952ba
3 changed files with 10 additions and 1 deletions
+1
View File
@@ -8,6 +8,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
- Add more fields for the Jira ticket and handle custom fields errors [(#8601)](https://github.com/prowler-cloud/prowler/pull/8601)
- Get Jira projects from test_connection [(#8634)](https://github.com/prowler-cloud/prowler/pull/8634)
- `AdditionalUrls` field in CheckMetadata [(#8590)](https://github.com/prowler-cloud/prowler/pull/8590)
- Support color for MANUAL finidngs in Jira tickets [(#8642)](https://github.com/prowler-cloud/prowler/pull/8642)
### Changed
+3
View File
@@ -789,6 +789,9 @@ class Jira:
return "#FF0000"
if status == "MUTED":
return "#FFA500"
if status == "MANUAL":
return "#FFFF00"
return "#000000"
@staticmethod
def get_severity_color(severity: str) -> str:
+6 -1
View File
@@ -976,7 +976,12 @@ class TestJiraIntegration:
@pytest.mark.parametrize(
"status, expected_color",
[("FAIL", "#FF0000"), ("PASS", "#008000"), ("MUTED", "#FFA500")],
[
("FAIL", "#FF0000"),
("PASS", "#008000"),
("MUTED", "#FFA500"),
("MANUAL", "#FFFF00"),
],
)
def test_get_color_from_status(self, status, expected_color):
"""Test that get_color_from_status returns the correct color for a status."""