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
13 changes: 0 additions & 13 deletions .github/coderabbit.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok'

implementation 'org.flywaydb:flyway-core'
runtimeOnly 'org.postgresql:postgresql:42.7.5'
runtimeOnly 'org.postgresql:postgresql'

implementation("software.amazon.awssdk:s3:2.32.24")
implementation 'org.mapstruct:mapstruct:1.5.2.Final'
Expand Down
25 changes: 25 additions & 0 deletions copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Pull Request Review Instructions

Please review this pull request with the following guidelines:

1. **Code Quality**
- Check for clear, maintainable, and efficient code.
- Ensure consistent naming, formatting, and conventions.

2. **Security**
- Look for potential vulnerabilities, unsafe code, or insecure patterns.

3. **Readability**
- Ensure code is easy to read and understand.
- Suggest improvements if logic is confusing or overly complex.

4. **Maintainability**
- Check if code is modular and easy to extend or refactor.
- Identify repeated code or potential for simplification.

5. **Comments & Feedback**
- Make inline comments for issues or suggestions.
- Summarize main suggestions at the end of the review.

6. **Approval**
- Do not approve the PR automatically.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ua.everybuy.database.repository.advertisement;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
Expand Down Expand Up @@ -41,15 +42,8 @@ List<CategoryAdvertisementCount> findCategoryCountsByUserIdAndSection(
"WHERE a.userId = :userId ")
List<Advertisement> findAllByUserId(Long userId);

@Query("""
SELECT a FROM Advertisement a
LEFT JOIN FETCH a.city
LEFT JOIN FETCH a.topSubCategory tsc
LEFT JOIN FETCH tsc.category
LEFT JOIN FETCH a.lowSubCategory
LEFT JOIN FETCH a.advertisementDeliveries
WHERE a.id = :id AND a.isEnabled = true
""")
@EntityGraph(attributePaths = {"topSubCategory.category", "lowSubCategory", "advertisementDeliveries"})
@Query("SELECT a FROM Advertisement a WHERE a.id = :id AND a.isEnabled = true")
Optional<Advertisement> findActiveById(@Param("id") Long id);

@Query("SELECT a.city.id FROM Advertisement a " +
Expand Down