Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Qodana
on:
workflow_dispatch:
pull_request:
push:
branches: # Specify your branches here
- main # The 'main' branch
- 'releases/*' # The release branches

jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0 # a full history is required for pull request analysis
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2025.1
with:
pr-mode: false
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
QODANA_ENDPOINT: 'https://qodana.cloud'
29 changes: 0 additions & 29 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

138 changes: 0 additions & 138 deletions .github/workflows/pr-quality-gate.yml

This file was deleted.

5 changes: 4 additions & 1 deletion cashu-gateway-rest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ RUN mvn -q package -DskipTests
# Runtime stage
FROM eclipse-temurin:21-jre
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
ENV CASHU_GATEWAY_PORT=8080
ENV VAULT_BASE_URL=http://localhost:${CASHU_GATEWAY_PORT}
COPY --from=build /build/target/cashu-gateway-rest-*.jar /app/app.jar
RUN chown -R /app
EXPOSE ${CASHU_GATEWAY_PORT}
ENTRYPOINT ["java","-jar","/app/app.jar"]
ENTRYPOINT ["java","-jar","/app/app.jar"]
4 changes: 4 additions & 0 deletions cashu-gateway-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
12 changes: 8 additions & 4 deletions cashu-gateway-rest/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
spring.application.name=cashu-gateway-spring
server.port=${cashu_gateway_port:8080}
server.port=

Copilot AI Sep 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting configuration properties to empty values is problematic. These properties should either have default values or use Spring's placeholder syntax with defaults (e.g., ${SERVER_PORT:8080}). Empty values will likely cause application startup failures.

Suggested change
server.port=
server.port=${SERVER_PORT:8080}

Copilot uses AI. Check for mistakes.

#spring.datasource.url=jdbc:postgresql://dbserver/gateway
spring.datasource.url=jdbc:postgresql://localhost:5432/cashu-gateway
spring.datasource.url=

Copilot AI Sep 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting configuration properties to empty values is problematic. These properties should either have default values or use Spring's placeholder syntax with defaults (e.g., ${SERVER_PORT:8080}). Empty values will likely cause application startup failures.

Suggested change
spring.datasource.url=
spring.datasource.url=${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/gateway}

Copilot uses AI. Check for mistakes.
spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.username=postgres
spring.datasource.password=password
spring.datasource.username=
spring.datasource.password=
Comment on lines +7 to +8

Copilot AI Sep 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting configuration properties to empty values is problematic. These properties should either have default values or use Spring's placeholder syntax with defaults (e.g., ${SERVER_PORT:8080}). Empty values will likely cause application startup failures.

Suggested change
spring.datasource.username=
spring.datasource.password=
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD:}

Copilot uses AI. Check for mistakes.
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect

server.address=

Copilot AI Sep 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting configuration properties to empty values is problematic. These properties should either have default values or use Spring's placeholder syntax with defaults (e.g., ${SERVER_PORT:8080}). Empty values will likely cause application startup failures.

Suggested change
server.address=
server.address=${SERVER_ADDRESS:127.0.0.1}

Copilot uses AI. Check for mistakes.
management.endpoints.web.exposure.include=health,info
management.endpoint.health.probes.enabled=true
management.health.defaults.enabled=true
Loading