This is actually required to fix an issue where it was possible to inject malicious code into the environment variables when using a PR that changed the diagnose script. At the same time, it is also good practice to use the last version of the called clang-tidy-pr-comments action.
The code updates the way we fetch the Pull Request number in the Github action. Rather than using an external action, we directly make use of Github's CLI, which helps improve the speed and reliability of the workflow. Additionally, the output report's format in terminal.py, previously named as "Git Comment", has been changed to "Error Files" to better reflect the information it carries.
CURA-10903
In this update, the GitHub workflow now uses the 'create-or-update-comment' action instead of the 'find-comment' action for PR comments. Additionally, a step has been added to get the PR number. This change is expected to facilitate more efficient PR commenting and handling.
CURa-10903
A new GitComment class was implemented to replace Diagnostic for deleted file checks. As part of this change, both main workflow files (printer-linter-pr-diagnose.yml and printer-linter-pr-post.yml) have been updated to accommodate this new class. Also, reports now use 'comment.md' instead of 'fixes.yml'. All of this is ultimately geared at improving diagnostic functionality and allowing deleted file checks to output directly to a Git comment.
CURA-10903
Using the pull-request-comments-from-clang-tidy-reports GH action
https://github.com/marketplace/actions/pull-request-comments-from-clang-tidy-reports
Which is possible because the printer-linter auto
puts the suggested fixes in the same format as
clang-tidy.
It consists of two workflows, to ensure safe handling
of forks PR's. The first workflows is the analysis and
the suggested fixes, these are then upload to the
second workflow which will use the suggested fixes
to past comments on the PR