Skip to content

Post clang-tidy review comments #8

Post clang-tidy review comments

Post clang-tidy review comments #8

name: Post clang-tidy review comments
on:
workflow_run:
workflows: ["clang-tidy-review"]
types:
- completed
permissions:
checks: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.workflow_run.pull_requests[0].number }}
cancel-in-progress: true
jobs:
post-comments:
# Only run if the triggering workflow was from a pull request
if: github.event.workflow_run.event == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Post review comments
id: post-review
uses: ZedThree/clang-tidy-review/[email protected]
with:
max_comments: 10
# Fail if there are any clang-tidy warnings
- name: Check for issues
if: steps.post-review.outputs.total_comments > 0
run: |
echo "::error::Found ${{ steps.post-review.outputs.total_comments }} clang-tidy issues"
exit 1