@@ -54,7 +54,7 @@ def build_payload(self):
54
54
# Git info
55
55
repo_info = get_git_context_info (self .master .request_id , os .path .realpath (self .master .github_workspace ))
56
56
git_identifier = f"{ repo_info ["repo_name" ]} /{ repo_info ["branch_name" ]} "
57
- org_identifier = self .get_org_identifier (git_identifier )
57
+ org_identifier = self .get_org_identifier (repo_info [ "branch_name" ] )
58
58
self .payload = {
59
59
"source" : "MegaLinter" ,
60
60
"gitRepoName" : repo_info ["repo_name" ],
@@ -75,7 +75,6 @@ def build_payload(self):
75
75
"descriptor" : linter .descriptor_id ,
76
76
"linter" : linter .linter_name ,
77
77
"linterKey" : linter .name ,
78
- "linterDocUrl" : linter_doc_url ,
79
78
"data" : {},
80
79
}
81
80
# Status
@@ -88,7 +87,10 @@ def build_payload(self):
88
87
else "error"
89
88
)
90
89
)
91
- linter_payload_data = {}
90
+ linter_payload_data = {
91
+ "linterDocUrl" : linter_doc_url ,
92
+ "jobUrl" : repo_info ["job_url" ]
93
+ }
92
94
linter_payload_data ["severityIcon" ] = (
93
95
"✅"
94
96
if linter .status == "success" and linter .return_code == 0
@@ -114,13 +116,15 @@ def build_payload(self):
114
116
self .payload ["linters" ].append (linter_payload )
115
117
116
118
117
- def get_org_identifier (self , git_identifier : str ):
119
+ def get_org_identifier (self , branch_name : str ):
118
120
org_identifier = config .get (
119
121
self .master .request_id , "API_REPORTER_ORG_IDENTIFIER" , None
120
122
)
121
123
if org_identifier is not None :
122
124
return org_identifier
123
- return git_identifier .replace ("monitoring_" ,"" ).replace ("__" ,"--" ).replace ("_sandbox" ,".sandbox" )
125
+ # Workaround for sfdx-hardis, but it's better to set ENV variable API_REPORTER_ORG_IDENTIFIER
126
+ return branch_name .replace ("monitoring_" ,"" ).replace (
127
+ "_" ,"-" ).replace ("__" ,"--" ).replace ("_sandbox" ,"__sandbox" )
124
128
125
129
126
130
def format_payload (self ):
0 commit comments