Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added some mappers #295

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2f250e6
added some mappers
ZiborovaVictoria May 9, 2024
bdb5527
fixed npe
ZiborovaVictoria May 9, 2024
a082e3f
issues/294 (incorrect data: rating and reviews count) was fixed
Sunagatov May 10, 2024
eb5e523
ProductReviewsStatisticsProvider was fixed
Sunagatov May 10, 2024
2b4eda1
ProductApi and ProductApiImpl were deleted
Sunagatov May 10, 2024
1130cc9
UserEntity was deleted in FavoriteListEntity
Sunagatov May 10, 2024
cd729c9
issues/291 (incorrect order of products when sorted by average rating…
Sunagatov May 10, 2024
8bba605
08.02.2024.part2.insert-product-review-table.sql was updated
Sunagatov May 10, 2024
17d2fae
28.07.2023.part6.insert-user-details-table-data.sql was updated
Sunagatov May 10, 2024
3b73355
added new addresses
Sunagatov May 10, 2024
8374128
Create dependabot.yml
Sunagatov May 10, 2024
77ab250
Update issue templates
Sunagatov May 11, 2024
265d8e8
Update dev-branch-pr-deployment-pipeline.yml
Sunagatov May 11, 2024
9d3f9c5
Create codacy.yml
Sunagatov May 11, 2024
2afeebf
Create codeql.yml
Sunagatov May 11, 2024
085ebef
Create sonarqube.yml
Sunagatov May 11, 2024
2d19887
Create greetings.yml
Sunagatov May 11, 2024
3e0d674
Update dependabot.yml
Sunagatov May 11, 2024
87cbfda
Update dependabot.yml
Sunagatov May 11, 2024
b2a347d
Update codeql.yml
Sunagatov May 11, 2024
a63f210
README.md was updated
Sunagatov May 11, 2024
12070a0
README.md was updated
Sunagatov May 11, 2024
8082116
fixed expressions -> @Named
ZiborovaVictoria May 13, 2024
f4b39d3
added tests for converters
ZiborovaVictoria May 13, 2024
f8a49f8
README.md was updated
Sunagatov May 14, 2024
a954692
Migration from Java 17 to Java 21 + fixed GOOGLE_AUTH error for local…
annstriganova May 16, 2024
9aadeb9
updated version in pom.xml
annstriganova May 16, 2024
49ec646
updated version in dev-branch-pr-build-and-test-pipeline.yaml
annstriganova May 17, 2024
eea40dc
Merge pull request #300 from Sunagatov/feature/java-21
Sunagatov May 17, 2024
3cefb0c
Update README.md
Sunagatov May 17, 2024
6528206
fixes
ZiborovaVictoria May 18, 2024
3ca1bc4
Update README.md
Sunagatov May 21, 2024
76cd7a4
added some mappers
ZiborovaVictoria May 9, 2024
f2f16fe
fixed npe
ZiborovaVictoria May 9, 2024
8444ba0
fixed expressions -> @Named
ZiborovaVictoria May 13, 2024
d61eb62
added tests for converters
ZiborovaVictoria May 13, 2024
f23b4db
fixes
ZiborovaVictoria May 18, 2024
dcfe493
Merge remote-tracking branch 'origin/feature/IL-287-custom-mappers-to…
ZiborovaVictoria May 26, 2024
5cb0e5f
tried to merge
ZiborovaVictoria May 26, 2024
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
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
61 changes: 61 additions & 0 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow checks out code, performs a Codacy security scan
# and integrates the results with the
# GitHub Advanced Security code scanning feature. For more information on
# the Codacy security scan action usage and parameters, see
# https://github.com/codacy/codacy-analysis-cli-action.
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.

name: Codacy Security Scan

on:
push:
branches: [ "development", "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "development" ]
schedule:
- cron: '36 12 * * 3'

permissions:
contents: read

jobs:
codacy-security-scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v4

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
34 changes: 34 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "CodeQL Java Analysis"

on:
push:
branches: [ "development", "master" ]
pull_request:
branches: [ "development", "master" ]
schedule:
- cron: '17 6 * * 5' # Weekly scheduled analysis

jobs:
analyze:
name: Analyze Java Code
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
security-events: write
packages: read
actions: read
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java-kotlin

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:java-kotlin"
12 changes: 6 additions & 6 deletions .github/workflows/dev-branch-pr-build-and-test-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: 'maven'

Expand Down Expand Up @@ -68,10 +68,10 @@ jobs:
restore-keys: |
${{ runner.os }}-m2

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: 'maven'

Expand All @@ -85,10 +85,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: 'maven'

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/dev-branch-pr-deployment-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Build and Deploy

on:
push:
pull_request:
types: [ closed ]
branches:
- development

Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Greetings

on:
pull_request_target:
types: [opened]
issues:
types: [opened]

jobs:
greeting:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Greet contributor
uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: |
Hello there!

We truly appreciate you taking the time to create a new issue for our project on GitHub. Your input helps us improve and grow. Thank you!
pr-message: |
Hello there!

Thank you for your contribution! We're delighted to see your Pull Request in our GitHub repository. Your efforts make a difference. Thanks a lot!
66 changes: 66 additions & 0 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow helps you trigger a SonarQube analysis of your code and populates
# GitHub Code Scanning alerts with the vulnerabilities found.
# (this feature is available starting from SonarQube 9.7, Developer Edition and above)

# 1. Make sure you add a valid GitHub configuration to your SonarQube (Administration > DevOps platforms > GitHub)

# 2. Import your project on SonarQube
# * Add your repository as a new project by clicking "Create project" from your homepage.
#
# 3. Select GitHub Actions as your CI and follow the tutorial
# * a. Generate a new token and add it to your GitHub repository's secrets using the name SONAR_TOKEN
# (On SonarQube, click on your avatar on top-right > My account > Security or ask your administrator)
#
# * b. Copy/paste your SonarQube host URL to your GitHub repository's secrets using the name SONAR_HOST_URL
#
# * c. Copy/paste the project Key into the args parameter below
# (You'll find this information in SonarQube by following the tutorial or by clicking on Project Information at the top-right of your project's homepage)

# Feel free to take a look at our documentation (https://docs.sonarqube.org/latest/analysis/github-integration/)
# or reach out to our community forum if you need some help (https://community.sonarsource.com/c/sq/10)

name: SonarQube analysis

on:
push:
branches: [ "development", "master" ]
pull_request:
branches: [ "development" ]
workflow_dispatch:

permissions:
pull-requests: read # allows SonarQube to decorate PRs with analysis results

jobs:
Analysis:
runs-on: ubuntu-latest

steps:
- name: Analyze with SonarQube

# You can pin the exact commit or the version.
# uses: SonarSource/sonarqube-scan-action@v1.1.0
uses: SonarSource/sonarqube-scan-action@7295e71c9583053f5bf40e9d4068a0c974603ec8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on SonarQube, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # add the URL of your instance to the secrets of this repo with the name SONAR_HOST_URL (Settings > Secrets > Actions > add new repository secret)
with:
# Additional arguments for the sonarcloud scanner
args:
# Unique key of your project. You can find it in SonarQube > [my project] > Project Information (top-right menu)
# mandatory
-Dsonar.projectKey=
# Comma-separated paths to directories containing main source files.
#-Dsonar.sources= # optional, default is project base directory
# When you need the analysis to take place in a directory other than the one from which it was launched
#-Dsonar.projectBaseDir= # optional, default is .
# Comma-separated paths to directories containing test source files.
#-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/
# Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing.
#-Dsonar.verbose= # optional, default is false
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM maven:3.9-eclipse-temurin-17 AS build
FROM maven:3.9-eclipse-temurin-21-alpine AS build
WORKDIR /usr/app
COPY . /usr/app
RUN mvn versions:set-property -Dproperty=project.version -DnewVersion=0.0.1 && \
mvn package -Pdev -DskipTests

FROM eclipse-temurin:17-jre-jammy
FROM eclipse-temurin:21-jdk-alpine
WORKDIR /usr/app
COPY --from=build /usr/app/target/*.jar /usr/app/app.jar
CMD ["java", "-jar", "/usr/app/app.jar"]
4 changes: 2 additions & 2 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM maven:3.9-eclipse-temurin-17 AS build
FROM maven:3.9-eclipse-temurin-21-alpine AS build
WORKDIR /usr/app
COPY . /usr/app
RUN mvn versions:set-property -Dproperty=project.version -DnewVersion=0.0.1 && \
mvn package -Pdev -DskipTests

FROM eclipse-temurin:17-jre-jammy
FROM maven:3.9-eclipse-temurin-21-alpine
WORKDIR /usr/app
ENV JAVA_TOOL_OPTIONS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
COPY --from=build /usr/app/target/*.jar /usr/app/app.jar
Expand Down
Loading
Loading