Skip to content

Commit ebe5e1b

Browse files
committed
ci: run CodeBoarding action on this repo's own PRs
Add .github/workflows/codeboarding.yml so the action reviews its own pull requests. Uses the local action (checkout + uses: ./) so each PR exercises the code under review, mirroring the README Quick Start triggers, permissions, concurrency, and /codeboarding collaborator guard.
1 parent 74538af commit ebe5e1b

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/codeboarding.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CodeBoarding review
2+
3+
on:
4+
pull_request:
5+
# Generate once, when the PR becomes reviewable, not on every push, so we
6+
# don't spend an LLM job per commit. Add `synchronize` to re-run on each
7+
# push, or refresh anytime with /codeboarding. 'closed' only cancels an
8+
# in-flight review (see concurrency), it doesn't start one.
9+
types: [opened, reopened, ready_for_review, closed]
10+
issue_comment:
11+
types: [created]
12+
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
issues: write
17+
18+
concurrency:
19+
group: codeboarding-${{ github.event.pull_request.number || github.event.issue.number }}
20+
# Cancel only when the PR closes — bot comments (issue_comment) and re-triggers
21+
# must not cancel a running review; they queue behind it instead.
22+
cancel-in-progress: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' }}
23+
24+
jobs:
25+
review:
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 60
28+
if: >
29+
(github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.draft == false) ||
30+
(github.event_name == 'issue_comment' && github.event.issue.pull_request != null &&
31+
startsWith(github.event.comment.body, '/codeboarding') &&
32+
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association))
33+
steps:
34+
# Dogfood: run the action from the checked-out repo (uses: ./) so each PR
35+
# exercises the action code under review, not the last published release.
36+
# The action reads its scripts via github.action_path and checks the engine
37+
# and target repo into subdirectories, so this local checkout is untouched.
38+
- uses: actions/checkout@v4
39+
- uses: ./
40+
with:
41+
llm_api_key: ${{ secrets.OPENROUTER_API_KEY }}

0 commit comments

Comments
 (0)