diff --git a/.github/workflows/codeboarding-review.yml b/.github/workflows/codeboarding-review.yml new file mode 100644 index 000000000..dc09088e6 --- /dev/null +++ b/.github/workflows/codeboarding-review.yml @@ -0,0 +1,36 @@ +name: CodeBoarding review + +on: + pull_request: + types: [opened, reopened, ready_for_review, synchronize] + issue_comment: + types: [created] + +permissions: + contents: read + actions: read + pull-requests: write + issues: write + id-token: write + +concurrency: + group: codeboarding-${{ github.event.pull_request.number || github.event.issue.number }} + cancel-in-progress: false + +jobs: + review: + if: > + (github.event_name == 'pull_request' && github.event.pull_request.draft == false && + github.event.pull_request.head.repo.full_name == github.repository) || + (github.event_name == 'issue_comment' && github.event.issue.pull_request != null && + startsWith(github.event.comment.body, '/codeboarding') && + contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + # Exercise https://github.com/CodeBoarding/CodeBoarding-action/pull/120. + - uses: CodeBoarding/CodeBoarding-action@refs/pull/120/head + with: + mode: review + llm: hosted + depth_level: 3