From 883f47c44fc3c2957cdd4a1777ecb097ba718934 Mon Sep 17 00:00:00 2001 From: Luca Rospocher Date: Mon, 5 Jan 2026 15:27:41 +0100 Subject: [PATCH 1/2] chore: Upgrade shadowJar plugin to 9.3.0 #WPB-21479 * Claude PR review only when opening PR --- .github/workflows/claude-code-review.yml | 47 ++++++++++++++++++++++ .github/workflows/claude.yml | 50 ++++++++++++++++++++++++ .gitignore | 6 +++ build.gradle.kts | 10 ++++- gradle/libs.versions.toml | 2 + 5 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/claude-code-review.yml create mode 100644 .github/workflows/claude.yml diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml new file mode 100644 index 0000000..f6b5808 --- /dev/null +++ b/.github/workflows/claude-code-review.yml @@ -0,0 +1,47 @@ +name: Claude Code Review + +on: + pull_request: + types: [opened] + +jobs: + claude-review: + if: github.actor != 'dependabot[bot]' + + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 1 + + - name: Run Claude Code Review + id: claude-review + uses: anthropics/claude-code-action@v1 + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + prompt: | + REPO: ${{ github.repository }} + PR NUMBER: ${{ github.event.pull_request.number }} + + Please review this pull request and provide feedback on: + - Code quality and best practices + - Potential bugs or issues + - Performance considerations + - Security concerns + - Test coverage + + Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback. + + Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR. + + # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md + # or https://docs.claude.com/en/docs/claude-code/sdk#command-line for available options + 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:*)"' + diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml new file mode 100644 index 0000000..1e1a81e --- /dev/null +++ b/.github/workflows/claude.yml @@ -0,0 +1,50 @@ +name: Claude Code + +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + issues: + types: [opened, assigned] + pull_request_review: + types: [submitted] + +jobs: + claude: + if: | + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || + (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + actions: read # Required for Claude to read CI results on PRs + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 1 + + - name: Run Claude Code + id: claude + uses: anthropics/claude-code-action@v1 + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + + # This is an optional setting that allows Claude to read CI results on PRs + additional_permissions: | + actions: read + + # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it. + # prompt: 'Update the pull request description to include a summary of changes.' + + # Optional: Add claude_args to customize behavior and configuration + # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md + # or https://docs.claude.com/en/docs/claude-code/sdk#command-line for available options + # claude_args: '--model claude-opus-4-1-20250805 --allowed-tools Bash(gh pr:*)' + diff --git a/.gitignore b/.gitignore index 50c93fe..fb62398 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,9 @@ out/ *.pid *.seed *.orig + +# Ignore Storage directory content but keep the directory +storage/* +!storage/.gitkeep + +CLAUDE.md diff --git a/build.gradle.kts b/build.gradle.kts index 4ae3fd0..57c3164 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,6 +6,8 @@ plugins { alias(libs.plugins.ktor) alias(libs.plugins.ktlint) alias(libs.plugins.detekt) + alias(libs.plugins.shadow) + application } group = "com.wire" @@ -90,12 +92,18 @@ detekt { } tasks { - shadowJar { + named("shadowJar") { + mergeServiceFiles() + duplicatesStrategy = DuplicatesStrategy.INCLUDE + archiveBaseName = "qrapp-all" archiveFileName.set("github-app.jar") manifest { attributes["Main-Class"] = "com.wire.github.ApplicationKt" } } + build { + dependsOn(shadowJar) + } /** * Dummy environment variables for tests diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1acbc92..b4d9a8e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,6 +12,7 @@ wire-sdk-version = "0.0.18" redis-version = "6.7.1.RELEASE" mustache-version = "0.9.14" mockk-version = "1.14.7" +shadow = "9.3.0" [plugins] kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-version" } @@ -19,6 +20,7 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi ktor = { id = "io.ktor.plugin", version.ref = "ktor-version" } ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint-version" } detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt-version" } +shadow = { id = "com.gradleup.shadow", version.ref = "shadow" } [libraries] ktor-server-core = { module = "io.ktor:ktor-server-core-jvm", version.ref = "ktor-version" } From b7b7ae1e5234ef9b2251bac514da1cedc7cbc67c Mon Sep 17 00:00:00 2001 From: Luca Rospocher Date: Mon, 5 Jan 2026 15:31:05 +0100 Subject: [PATCH 2/2] Typo of qrapp replaced with github-app --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 57c3164..82e165e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -95,7 +95,7 @@ tasks { named("shadowJar") { mergeServiceFiles() duplicatesStrategy = DuplicatesStrategy.INCLUDE - archiveBaseName = "qrapp-all" + archiveBaseName = "github-app" archiveFileName.set("github-app.jar") manifest { attributes["Main-Class"] = "com.wire.github.ApplicationKt"