From 38dce009dbe409ba984631ee8ddd8b73ff9ecff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Birm=C3=A9?= Date: Fri, 13 Dec 2024 22:40:18 +0100 Subject: [PATCH] chore: action to code review on pr (#6) --- .github/workflows/review.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/review.yml diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml new file mode 100644 index 0000000..6ab6e05 --- /dev/null +++ b/.github/workflows/review.yml @@ -0,0 +1,26 @@ +name: Perform code review + +on: [pull_request] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Review branch + id: review + uses: EyevinnOSC/code-review-action@main + with: + repo_url: ${{ github.server_url }}/${{ github.repository }}/tree/${{ github.head_ref}} + env: + OSC_ACCESS_TOKEN: ${{ secrets.OSC_ACCESS_TOKEN }} + - name: comment + uses: actions/github-script@v7 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Code review score: ${{ steps.review.outputs.score }}\n${{ join(fromJSON(steps.review.outputs.suggestions), ', ') }}' + })