Skip to content

Commit 8db85c1

Browse files
committed
Add CodeBoarding architecture analysis: add codeboarding.yml
1 parent 6df0d5d commit 8db85c1

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

‎.github/workflows/codeboarding.yml‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CodeBoarding review
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, closed, synchronize]
6+
issue_comment:
7+
types: [created]
8+
9+
# No workflow-level permissions: each job requests only what it needs (least
10+
# privilege), so the default token starts with none.
11+
permissions: {}
12+
13+
concurrency:
14+
group: codeboarding-${{ github.event.pull_request.number || github.event.issue.number }}
15+
cancel-in-progress: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' }}
16+
17+
jobs:
18+
review:
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 60
21+
permissions:
22+
contents: read # check out the repo + read the committed baseline (no writes in review mode)
23+
pull-requests: write # post the architecture-diff PR comment
24+
issues: write # the /codeboarding issue_comment trigger + comment API
25+
id-token: write # mint a GitHub OIDC token for the free hosted tier (write is the only level for id-token)
26+
actions: read # let a repeat review download the analysis an earlier run published, instead of re-deriving the whole PR
27+
if: >
28+
(github.event_name == 'pull_request' && github.event.action != 'closed' &&
29+
github.event.pull_request.head.repo.full_name == github.repository) ||
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+
- uses: CodeBoarding/CodeBoarding-action@v1
35+
with:
36+
# CodeBoarding's free hosted tier. No secret to add: the run authenticates
37+
# with the GitHub OIDC token that `id-token: write` above grants.
38+
llm: hosted

0 commit comments

Comments
 (0)