You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, that line of text is only going to be there if the comment was posted from a GitHub action runner, because only then a non-empty action_run_url value has been passed to build_markdown_summary(). If that variable is an empty string, the text that is included is different:
We are using Jenkins (where we provide enough context and a token for the reporter to run successfully), but each PR update triggers a new comment.
The check seems to be very fragile in any case. Perhaps the reporter could include a HTML comment with a know identifier, instead? E.g. append ”\n\n<!— mega_linter_github_comment_reporter comment marker —> to the generated markdown and look for that text instead?
The marker could even incorporate the workflow name (GITHUB_WORKFLOW) and jobid (GITHUB_JOB), if set, to make it possible to run more than one MegaLinter job per PR.
The text was updated successfully, but these errors were encountered:
The GitHub Comment reporter identifies a pre-existing Mega-Linter comment in a PR by looking for a specific line of text:
https://github.com/megalinter/megalinter/blob/abfb0dccab7ff24e8ac4363a1616df83babf97a3/megalinter/reporters/GithubCommentReporter.py#L88-L93
However, that line of text is only going to be there if the comment was posted from a GitHub action runner, because only then a non-empty
action_run_url
value has been passed tobuild_markdown_summary()
. If that variable is an empty string, the text that is included is different:https://github.com/megalinter/megalinter/blob/abfb0dccab7ff24e8ac4363a1616df83babf97a3/megalinter/utils_reporter.py#L88-L94
We are using Jenkins (where we provide enough context and a token for the reporter to run successfully), but each PR update triggers a new comment.
The check seems to be very fragile in any case. Perhaps the reporter could include a HTML comment with a know identifier, instead? E.g. append
”\n\n<!— mega_linter_github_comment_reporter comment marker —>
to the generated markdown and look for that text instead?The marker could even incorporate the workflow name (
GITHUB_WORKFLOW
) and jobid (GITHUB_JOB
), if set, to make it possible to run more than one MegaLinter job per PR.The text was updated successfully, but these errors were encountered: