Skip to content

Commit a08bd42

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/real-time-sink-patterns
2 parents 5b6a667 + 27594a8 commit a08bd42

48 files changed

Lines changed: 11719 additions & 395 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 118 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ name: Build docker images
22

33
on:
44
push:
5-
tags: ["*"]
5+
branches:
6+
- main
7+
- 'feature/**'
8+
- 'bugfix/**'
69

710
jobs:
811
build:
@@ -12,6 +15,21 @@ jobs:
1215
- uses: actions/checkout@v4
1316
with:
1417
fetch-depth: 2
18+
- name: Set version based on branch
19+
id: version
20+
run: |
21+
BASE_VERSION=$(grep version gradle.properties | cut -d= -f2)
22+
COMMIT_HASH=$(git rev-parse --short HEAD)
23+
24+
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
25+
VERSION="$BASE_VERSION"
26+
else
27+
VERSION="$BASE_VERSION-$COMMIT_HASH"
28+
fi
29+
30+
echo "VERSION=$VERSION" >> $GITHUB_ENV
31+
echo "version=$VERSION" >> $GITHUB_OUTPUT
32+
echo "Building version: $VERSION"
1533
- uses: actions/setup-java@v4
1634
with:
1735
java-version: '17'
@@ -26,6 +44,8 @@ jobs:
2644
- name: Build and push images
2745
run: bash docker-action.sh
2846
env:
47+
VERSION: ${{ env.VERSION }}
48+
GITHUB_REF: ${{ github.ref }}
2949
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
3050
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
3151
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
@@ -41,19 +61,39 @@ jobs:
4161

4262
osx:
4363
needs: build
44-
runs-on: [macos-latest]
64+
strategy:
65+
matrix:
66+
include:
67+
- runner: macos-13 # Intel x64
68+
arch: x64
69+
arch_name: x86_64
70+
- runner: macos-14 # Apple Silicon arm64
71+
arch: aarch64
72+
arch_name: aarch64
73+
runs-on: ${{ matrix.runner }}
4574

4675
steps:
4776
- uses: actions/checkout@v4
4877
with:
4978
fetch-depth: 2
5079
- name: Set version
51-
run: echo "APP_VERSION=$(grep version gradle.properties | cut -d= -f2)" >> $GITHUB_ENV
80+
run: |
81+
BASE_VERSION=$(grep version gradle.properties | cut -d= -f2)
82+
COMMIT_HASH=$(git rev-parse --short HEAD)
83+
84+
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
85+
APP_VERSION="$BASE_VERSION"
86+
else
87+
APP_VERSION="$BASE_VERSION-$COMMIT_HASH"
88+
fi
89+
90+
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
91+
echo "Building version: $APP_VERSION"
5292
- uses: actions/setup-java@v4
5393
with:
5494
java-version: '21'
5595
java-package: jdk
56-
architecture: x64
96+
architecture: ${{ matrix.arch }}
5797
distribution: oracle
5898
- name: Download fat jar
5999
uses: actions/download-artifact@v4
@@ -62,11 +102,13 @@ jobs:
62102
path: app/build/libs/
63103
- name: Package jar as dmg installer
64104
run: 'jpackage --main-jar data-caterer.jar "@misc/jpackage/jpackage.cfg" "@misc/jpackage/jpackage-mac.cfg"'
105+
- name: Rename DMG with version and architecture
106+
run: mv DataCaterer-*.dmg DataCaterer-${{ env.APP_VERSION }}-macos-${{ matrix.arch_name }}.dmg
65107
- name: Upload dmg
66108
uses: actions/upload-artifact@v4
67109
with:
68-
name: data-caterer-mac
69-
path: "DataCaterer-1.0.0.dmg"
110+
name: data-caterer-macos-${{ matrix.arch_name }}
111+
path: "DataCaterer-${{ env.APP_VERSION }}-macos-${{ matrix.arch_name }}.dmg"
70112
overwrite: true
71113

72114
windows:
@@ -78,7 +120,18 @@ jobs:
78120
with:
79121
fetch-depth: 2
80122
- name: Set version
81-
run: echo "APP_VERSION=$(grep version gradle.properties | cut -d= -f2)" >> $env:GITHUB_ENV
123+
run: |
124+
$BASE_VERSION = (Get-Content gradle.properties | Select-String '^version=' | ForEach-Object { $_ -replace 'version=','' }).Trim()
125+
$COMMIT_HASH = git rev-parse --short HEAD
126+
127+
if ("${{ github.ref }}" -eq "refs/heads/main") {
128+
$APP_VERSION = $BASE_VERSION
129+
} else {
130+
$APP_VERSION = "$BASE_VERSION-$COMMIT_HASH"
131+
}
132+
133+
echo "APP_VERSION=$APP_VERSION" >> $env:GITHUB_ENV
134+
Write-Output "Building version: $APP_VERSION"
82135
- uses: actions/setup-java@v4
83136
with:
84137
java-version: '21'
@@ -92,11 +145,13 @@ jobs:
92145
path: app/build/libs/
93146
- name: Package jar as exe
94147
run: 'jpackage --main-jar data-caterer.jar "@misc/jpackage/jpackage.cfg" "@misc/jpackage/jpackage-windows.cfg"'
148+
- name: Rename EXE with version and architecture
149+
run: mv DataCaterer-*.exe DataCaterer-$env:APP_VERSION-windows-x86_64.exe
95150
- name: Upload installer
96151
uses: actions/upload-artifact@v4
97152
with:
98-
name: data-caterer-windows
99-
path: "DataCaterer-1.0.0.exe"
153+
name: data-caterer-windows-x86_64
154+
path: "DataCaterer-${{ env.APP_VERSION }}-windows-x86_64.exe"
100155
overwrite: true
101156

102157
linux-amd64:
@@ -108,12 +163,23 @@ jobs:
108163
with:
109164
fetch-depth: 2
110165
- name: Set version
111-
run: echo "APP_VERSION=$(grep version gradle.properties | cut -d= -f2)" >> $GITHUB_ENV
166+
run: |
167+
BASE_VERSION=$(grep version gradle.properties | cut -d= -f2)
168+
COMMIT_HASH=$(git rev-parse --short HEAD)
169+
170+
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
171+
APP_VERSION="$BASE_VERSION"
172+
else
173+
APP_VERSION="$BASE_VERSION-$COMMIT_HASH"
174+
fi
175+
176+
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
177+
echo "Building version: $APP_VERSION"
112178
- uses: actions/setup-java@v4
113179
with:
114180
java-version: '21'
115181
java-package: jdk
116-
architecture: x64
182+
architecture: ${{ matrix.arch }}
117183
distribution: oracle
118184
- name: Download fat jar
119185
uses: actions/download-artifact@v4
@@ -122,13 +188,26 @@ jobs:
122188
path: app/build/libs/
123189
- name: Package jar as debian package (amd64)
124190
run: 'jpackage --main-jar data-caterer.jar "@misc/jpackage/jpackage.cfg" "@misc/jpackage/jpackage-linux.cfg"'
125-
- name: List directory
126-
run: ls -lart
191+
- name: Rename deb with version
192+
run: |
193+
DEB_FILE=$(ls datacaterer_*_amd64.deb 2>/dev/null | head -n 1)
194+
if [ -n "$DEB_FILE" ]; then
195+
echo "Found deb file: $DEB_FILE"
196+
mv "$DEB_FILE" datacaterer_${{ env.APP_VERSION }}_amd64.deb
197+
echo "Renamed to: datacaterer_${{ env.APP_VERSION }}_amd64.deb"
198+
else
199+
echo "No deb file found"
200+
echo "Current directory:"
201+
pwd
202+
echo "Files in current directory:"
203+
ls -lart
204+
exit 1
205+
fi
127206
- name: Upload deb (amd64)
128207
uses: actions/upload-artifact@v4
129208
with:
130209
name: data-caterer-linux-amd64
131-
path: "datacaterer_1.0.0_amd64.deb"
210+
path: "datacaterer_${{ env.APP_VERSION }}_amd64.deb"
132211
overwrite: true
133212

134213
linux-arm64:
@@ -140,45 +219,54 @@ jobs:
140219
with:
141220
fetch-depth: 2
142221
- name: Set version
143-
run: echo "APP_VERSION=$(grep version gradle.properties | cut -d= -f2)" >> $GITHUB_ENV
222+
run: |
223+
BASE_VERSION=$(grep version gradle.properties | cut -d= -f2)
224+
COMMIT_HASH=$(git rev-parse --short HEAD)
225+
226+
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
227+
APP_VERSION="$BASE_VERSION"
228+
else
229+
APP_VERSION="$BASE_VERSION-$COMMIT_HASH"
230+
fi
144231
145-
# Set up QEMU for cross-platform builds
232+
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
233+
echo "Building version: $APP_VERSION"
146234
- name: Set up QEMU
147235
uses: docker/setup-qemu-action@v3
148236
with:
149237
platforms: arm64
150-
151-
# Set up Docker Buildx
152238
- name: Set up Docker Buildx
153239
uses: docker/setup-buildx-action@v3
154-
155240
- name: Download fat jar
156241
uses: actions/download-artifact@v4
157242
with:
158243
name: jars
159244
path: app/build/libs/
160-
161-
# Use Docker container with ARM64 JDK for jpackage
162245
- name: Package jar as debian package (arm64)
163246
run: |
164247
docker run --rm --platform linux/arm64 \
165248
-v $(pwd):/workspace \
166249
-w /workspace \
167250
arm64v8/eclipse-temurin:21-jdk \
168251
bash -c "apt-get update && apt-get install -y fakeroot && jpackage --main-jar data-caterer.jar '@misc/jpackage/jpackage.cfg' '@misc/jpackage/jpackage-linux.cfg'"
169-
170-
- name: List directory
171-
run: ls -lart
172-
173-
- name: Rename output to indicate arm64
252+
- name: Rename output to indicate version and architecture (arm64)
174253
run: |
175-
if [ -f "datacaterer_1.0.0_amd64.deb" ]; then
176-
mv datacaterer_1.0.0_amd64.deb datacaterer_1.0.0_arm64.deb
254+
DEB_FILE=$(ls datacaterer_*_arm64.deb 2>/dev/null | head -n 1)
255+
if [ -n "$DEB_FILE" ]; then
256+
echo "Found deb file: $DEB_FILE"
257+
mv "$DEB_FILE" datacaterer_${{ env.APP_VERSION }}_arm64.deb
258+
echo "Renamed to: datacaterer_${{ env.APP_VERSION }}_arm64.deb"
259+
else
260+
echo "No deb file found"
261+
echo "Current directory:"
262+
pwd
263+
echo "Files in current directory:"
264+
ls -lart
265+
exit 1
177266
fi
178-
179267
- name: Upload deb (arm64)
180268
uses: actions/upload-artifact@v4
181269
with:
182270
name: data-caterer-linux-arm64
183-
path: "datacaterer_1.0.0_arm64.deb"
271+
path: "datacaterer_${{ env.APP_VERSION }}_arm64.deb"
184272
overwrite: true
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Claude Code Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
# Optional: Only run on specific file changes
7+
# paths:
8+
# - "src/**/*.ts"
9+
# - "src/**/*.tsx"
10+
# - "src/**/*.js"
11+
# - "src/**/*.jsx"
12+
13+
jobs:
14+
claude-review:
15+
# Optional: Filter by PR author
16+
# if: |
17+
# github.event.pull_request.user.login == 'external-contributor' ||
18+
# github.event.pull_request.user.login == 'new-developer' ||
19+
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20+
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
pull-requests: read
25+
issues: read
26+
id-token: write
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 1
33+
34+
- name: Run Claude Code Review
35+
id: claude-review
36+
uses: anthropics/claude-code-action@v1
37+
with:
38+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39+
prompt: |
40+
REPO: ${{ github.repository }}
41+
PR NUMBER: ${{ github.event.pull_request.number }}
42+
43+
Please review this pull request and provide feedback on:
44+
- Code quality and best practices
45+
- Potential bugs or issues
46+
- Performance considerations
47+
- Security concerns
48+
- Test coverage
49+
50+
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
51+
52+
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
53+
54+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
55+
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
56+
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
57+

.github/workflows/claude.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
actions: read # Required for Claude to read CI results on PRs
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 1
32+
33+
- name: Run Claude Code
34+
id: claude
35+
uses: anthropics/claude-code-action@v1
36+
with:
37+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38+
39+
# This is an optional setting that allows Claude to read CI results on PRs
40+
additional_permissions: |
41+
actions: read
42+
43+
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44+
# prompt: 'Update the pull request description to include a summary of changes.'
45+
46+
# Optional: Add claude_args to customize behavior and configuration
47+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48+
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
49+
# claude_args: '--allowed-tools Bash(gh pr:*)'
50+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ api_validation_report.txt
4444
# UI
4545
ui/node_modules
4646
ui/coverage
47+
.playwright*
48+
node_modules/
4749

4850
# Docs build caches
4951
.docs

0 commit comments

Comments
 (0)