Skip to content

Commit

Permalink
chore: action to code review on pr (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
birme authored Dec 13, 2024
1 parent b666bba commit 38dce00
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -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), ', ') }}'
})

0 comments on commit 38dce00

Please sign in to comment.