Skip to content

Commit 7a304d0

Browse files
committed
Add CodeBoarding review and sync workflows
1 parent 30200b6 commit 7a304d0

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CodeBoarding sync
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths-ignore:
7+
- '.codeboarding/analysis.json'
8+
- '.codeboarding/fingerprint.json'
9+
- '.codeboarding/static_analysis.pkl'
10+
- '.codeboarding/static_analysis.sha'
11+
- '.codeboarding/codeboarding_version.json'
12+
workflow_dispatch:
13+
inputs:
14+
force_full:
15+
description: Rebuild without the committed baseline
16+
type: boolean
17+
default: false
18+
19+
permissions:
20+
contents: write
21+
pull-requests: write
22+
id-token: write
23+
24+
concurrency:
25+
group: codeboarding-sync-main
26+
cancel-in-progress: false
27+
28+
jobs:
29+
sync:
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 60
32+
steps:
33+
- uses: CodeBoarding/CodeBoarding-action@action-v2-contract-only-simplification
34+
with:
35+
mode: sync
36+
target_branch: main
37+
sync_strategy: pull_request
38+
force_full: ${{ inputs.force_full || false }}

.github/workflows/codeboarding.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CodeBoarding review
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, ready_for_review]
6+
issue_comment:
7+
types: [created]
8+
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
issues: write
13+
id-token: write
14+
15+
concurrency:
16+
group: codeboarding-review-${{ github.event.pull_request.number || github.event.issue.number }}
17+
cancel-in-progress: false
18+
19+
jobs:
20+
review:
21+
if: >
22+
(github.event_name == 'pull_request' && github.event.pull_request.draft == false &&
23+
github.event.pull_request.head.repo.full_name == github.repository && github.head_ref != 'codeboarding/sync') ||
24+
(github.event_name == 'issue_comment' && github.event.issue.pull_request != null &&
25+
startsWith(github.event.comment.body, '/codeboarding') &&
26+
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association))
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 60
29+
steps:
30+
- uses: CodeBoarding/CodeBoarding-action@action-v2-contract-only-simplification

0 commit comments

Comments
 (0)