Skip to content

Commit a904a41

Browse files
committed
convert common attributes
1 parent 1a0783d commit a904a41

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sonar/util/project_helper.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
from typing import Any
2323
from sonar import utilities as util
24-
24+
from sonar.util import common_json_helper
2525

2626
UNNEEDED_TASK_DATA = (
2727
"analysisId",
@@ -84,8 +84,6 @@
8484
def convert_project_json(old_json: dict[str, Any]) -> dict[str, Any]:
8585
"""Converts the sonar-config projects old JSON report format for a single project to the new one"""
8686
new_json = old_json.copy()
87-
if "permissions" in old_json:
88-
new_json["permissions"] = util.perms_to_list(old_json["permissions"])
8987
if "qualityProfiles" in old_json:
9088
new_json["qualityProfiles"] = util.dict_to_list(old_json["qualityProfiles"], "language", "name")
9189
if "branches" in old_json:
@@ -99,6 +97,7 @@ def convert_project_json(old_json: dict[str, Any]) -> dict[str, Any]:
9997
if AI_CODE_FIX in new_json["settings"] and not new_json["settings"][AI_CODE_FIX]:
10098
new_json["settings"].pop(AI_CODE_FIX)
10199
new_json["settings"] = util.dict_to_list(dict(sorted(new_json["settings"].items())), "key", "value")
100+
new_json = common_json_helper.convert_common_fields(new_json)
102101
return util.order_dict(new_json, _JSON_KEY_ORDER)
103102

104103

0 commit comments

Comments
 (0)