ansys / pyaedt

AEDT Python Client Package
https://aedt.docs.pyansys.com
MIT License
185 stars 101 forks source link

FIX: Vale usage and its integration in CICD #4881

Closed SMoraisAnsys closed 2 days ago

SMoraisAnsys commented 3 days ago

Changes:

The reason for the last change is related to #4880. The problem this PR tackles is the fact that a PR from a fork, dependabot, ... ends up failing the doc-style job of our CICD.

From my understanding of the problem, it is related to the permissions associated to GitHub token in the event pull_request_target. Since this permissions can differ from one context to another, some PR might add changes passing doc-style but doing so while adding vale warnings. Those are pending bombs as they will impact future PR(s) where the permissions are not enough (for example, cases where GitHub token doesn't have write permission of Review API). Indeed, in such cases, the report results are performed via logging command and creating annotations similar to github-pr-check reporter as a fallback. However, the behavior is different as in this case warnings cause reviewdog to exit with status code 1 and make the documentation-style fail.

Proof that author access has no impact: PR #4882 comes from my fork of pyaedt and has the same permission issue.

This seems to be related to https://github.com/reviewdog/reviewdog/issues/1408 and the workaround we are applying here is to update every warning severity to error.

Closes #4880

ansys-reviewer-bot[bot] commented 3 days ago

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

codecov[bot] commented 3 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.16%. Comparing base (0e38674) to head (4ecf96c). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4881 +/- ## ========================================== - Coverage 83.17% 83.16% -0.01% ========================================== Files 118 118 Lines 54144 54142 -2 ========================================== - Hits 45033 45027 -6 - Misses 9111 9115 +4 ```
SMoraisAnsys commented 3 days ago

Temporary passing to draft due to CI typo (deleted breaking lines)