diff --git a/megalinter/reporters/GithubCommentReporter.py b/megalinter/reporters/GithubCommentReporter.py index b22d7f2bb85..ae7b997222c 100644 --- a/megalinter/reporters/GithubCommentReporter.py +++ b/megalinter/reporters/GithubCommentReporter.py @@ -49,7 +49,7 @@ def comment_marker(self): jobid = os.getenv("GITHUB_JOB") workflow = workflow and f"workflow={workflow!r}" jobid = jobid and f"jobid={jobid!r}" - workspace = get_workspace_marker(self) + workspace = get_workspace_marker(self.master.request_id) identifier = " ".join( ["github-comment-reporter", *filter(None, (workflow, jobid, workspace))] ) diff --git a/megalinter/utils_reporter.py b/megalinter/utils_reporter.py index e27904d6d78..cf1aa51d72d 100644 --- a/megalinter/utils_reporter.py +++ b/megalinter/utils_reporter.py @@ -336,9 +336,9 @@ def get_linter_infos(linter): linter_infos["iconPngUrl"] = linter.linter_icon_png_url return linter_infos -def get_workspace_marker(reporter_self): +def get_workspace_marker(request_id): github_workspace = os.getenv("GITHUB_WORKSPACE") - workspace = config.get(reporter_self.master.request_id, "DEFAULT_WORKSPACE", github_workspace) + workspace = config.get(request_id, "DEFAULT_WORKSPACE", github_workspace) if github_workspace is None or workspace == github_workspace: workspace = None workspace = workspace and f"workspace={workspace!r}"