Closed marcelwa closed 1 year ago
I think you have to switch to the split workflow to make this work. The Dependabot doesn't have enough permissions to create reviews in your repository. The same happens with PRs from external forks.
When enabling the split workflow, the GH Action running with Dependabot permissions will only generate a file with the review content. A second workflow running with elevated permissions will then post it. Just check out the main readme, there is an example you can copy to your repo.
Thank you for your explanation and recommendation to split the workflow! I did that and while it seems to solve the original issue, a new one now appears. Namely that if no clang-tidy-review-output.json
was created by clang-tidy-review
, then the uploaded ZIP artifact will only contain the clang-tidy-review-metadata.json
which leads to clang-tidy-review/post
failing with:
Traceback (most recent call last):
File "/action/post.py", line 65, in <module>
main(
File "/action/post.py", line 30, in main
review = load_review()
^^^^^^^^^^^^^
File "/action/clang_tidy_review/__init__.py", line 704, in load_review
with open(REVIEW_FILE, "r") as review_file:
^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'clang-tidy-review-output.json'
Here is an example workflow run.
It seems like there is bug that occurs when
clang-tidy-review
tries to post its LGTM message to a dependabot PR. I get the following message on two different PRs where only one of them affectsclang-tidy-review
:You can find the runs in question here and here.
Thanks for your help!