Skip to content

Commit fec64ac

Browse files
Merge pull request #1 from CodeBoarding/codeboarding/setup-action
Add CodeBoarding architecture analysis
2 parents 6df0d5d + a14bf30 commit fec64ac

2 files changed

Lines changed: 86 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CodeBoarding sync
2+
3+
on:
4+
push:
5+
branches: ['dev']
6+
# Loop guard: don't re-trigger on the files this workflow itself commits.
7+
# List generated files only: user-authored scope configuration must still trigger
8+
# regeneration, while a merged sync PR must not trigger a loop.
9+
paths-ignore:
10+
- '.codeboarding/*.md'
11+
- '.codeboarding/analysis.json'
12+
- '.codeboarding/fingerprint.json'
13+
- '.codeboarding/static_analysis.pkl'
14+
- '.codeboarding/static_analysis.sha'
15+
- '.codeboarding/codeboarding_version.json'
16+
- '.codeboarding/health/health_report.json'
17+
- 'docs/development/architecture.md'
18+
workflow_dispatch:
19+
inputs:
20+
force_full:
21+
description: 'Ignore the committed baseline and rebuild it from scratch (full analysis).'
22+
type: boolean
23+
required: false
24+
default: false
25+
26+
permissions:
27+
contents: write # commit the generated baseline + docs to the branch
28+
id-token: write # identifies this repo to CodeBoarding's hosted tier, used by the free
29+
# tier AND a license, and as the fallback until your own key exists
30+
31+
concurrency:
32+
# Serialize against itself so a push landing mid-run can't make two commits.
33+
group: codeboarding-sync
34+
cancel-in-progress: false
35+
36+
jobs:
37+
sync:
38+
runs-on: ubuntu-latest
39+
timeout-minutes: 60
40+
steps:
41+
- uses: CodeBoarding/CodeBoarding-action@v1
42+
with:
43+
mode: sync
44+
force_full: ${{ inputs.force_full || false }}
45+
target_branch: 'dev'
46+
# CodeBoarding's free hosted tier. No secret to add: the run authenticates
47+
# with the GitHub OIDC token that `id-token: write` above grants.
48+
llm: hosted

‎.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)