15 Commits

Author SHA1 Message Date
Erwan MATHIEU
dca3cb2cca Fix wrong variable given to script 2024-05-28 09:18:46 +02:00
Erwan MATHIEU
5681bf6507 Fix wrong file path 2024-05-28 08:53:19 +02:00
Erwan MATHIEU
811c859fc5 Fix indentation 2024-05-28 08:43:48 +02:00
Erwan MATHIEU
32cac847b4 Update the printer-linter post actions to use the last version of inner action
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.
2024-05-27 09:00:40 +02:00
Erwan MATHIEU
170c511568 Reduce permissions on printer-linter GitHub actions
Previously they had no permission set, so by default all write access. We now specify only the required permissions for each of them.
2024-05-23 11:49:35 +02:00
Saumya Jain
3016820bee fixing printer linter PR post 2024-04-11 09:47:40 +02:00
Saumya Jain
a965392559 Update method for getting PR number and modify output report
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
2024-04-10 14:16:25 +02:00
Saumya Jain
d52cd78852 Update GitHub workflow to use create-or-update-comment action
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
2024-04-10 14:01:17 +02:00
Saumya Jain
561a40d000 Implement GitComment class and update workflow files
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
2024-04-09 11:33:24 +02:00
jelle Spijker
8117087664 Revert "Fix multiline printer-linter PR suggestions"
This reverts commit 7820cc98
2022-12-13 11:30:13 +01:00
Jelle Spijker
9f3490893a
use master for clang-tidy-pr-comments 2022-12-10 16:05:07 +01:00
jspijker
7820cc9840 Fix multiline printer-linter PR suggestions 2022-12-02 10:28:42 +01:00
jspijker
fac2aeb28f Use checkout v3 2022-11-30 20:28:17 +01:00
jspijker
13c00dd496 Request changes if printer-linter finds issues 2022-11-30 20:07:48 +01:00
jspijker
32673bedea Add PR review workflows
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
2022-11-21 13:23:04 +01:00