From 318c73b89f792520517ffd9f9dae7afd2536ff39 Mon Sep 17 00:00:00 2001 From: "Felix T.J. Dietrich" Date: Sun, 27 Oct 2024 22:09:07 +0100 Subject: [PATCH] fix login and minor styling adjustments --- .../gitprovider/issuecomment/IssueCommentRepository.java | 2 +- .../gitprovider/pullrequest/PullRequestRepository.java | 4 ++-- .../pullrequestreview/PullRequestReviewRepository.java | 2 +- .../gitprovider/repository/RepositoryRepository.java | 2 +- .../in/www1/hephaestus/gitprovider/user/UserRepository.java | 2 +- webapp/src/app/core/header/header.component.html | 4 +--- webapp/src/app/home/leaderboard/leaderboard.component.ts | 2 +- 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/issuecomment/IssueCommentRepository.java b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/issuecomment/IssueCommentRepository.java index 41943b29..57755521 100644 --- a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/issuecomment/IssueCommentRepository.java +++ b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/issuecomment/IssueCommentRepository.java @@ -17,7 +17,7 @@ public interface IssueCommentRepository extends JpaRepository= :activitySince + ic.author.login ILIKE :authorLogin AND ic.createdAt >= :activitySince AND (:onlyFromPullRequests = false OR ic.issue.htmlUrl LIKE '%/pull/%') ORDER BY ic.createdAt DESC """) diff --git a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/pullrequest/PullRequestRepository.java b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/pullrequest/PullRequestRepository.java index 6c4a2a3c..324d1e13 100644 --- a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/pullrequest/PullRequestRepository.java +++ b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/pullrequest/PullRequestRepository.java @@ -16,7 +16,7 @@ public interface PullRequestRepository extends JpaRepository @Query(""" SELECT MIN(p.createdAt) FROM PullRequest p - WHERE p.author.login = :authorLogin + WHERE p.author.login ILIKE :authorLogin """) Optional firstContributionByAuthorLogin(@Param("authorLogin") String authorLogin); @@ -27,7 +27,7 @@ SELECT MIN(p.createdAt) JOIN FETCH p.author LEFT JOIN FETCH p.assignees LEFT JOIN FETCH p.repository - WHERE (p.author.login = :assigneeLogin OR :assigneeLogin IN (SELECT u.login FROM p.assignees u)) AND p.state IN :states + WHERE (p.author.login ILIKE :assigneeLogin OR LOWER(:assigneeLogin) IN (SELECT LOWER(u.login) FROM p.assignees u)) AND p.state IN :states ORDER BY p.createdAt DESC """) List findAssignedByLoginAndStates( diff --git a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/pullrequestreview/PullRequestReviewRepository.java b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/pullrequestreview/PullRequestReviewRepository.java index 6ba427c9..8a670813 100644 --- a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/pullrequestreview/PullRequestReviewRepository.java +++ b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/pullrequestreview/PullRequestReviewRepository.java @@ -19,7 +19,7 @@ public interface PullRequestReviewRepository extends JpaRepository= :activitySince + WHERE prr.author.login ILIKE :authorLogin AND prr.submittedAt >= :activitySince ORDER BY prr.submittedAt DESC """) List findAllByAuthorLoginSince( diff --git a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/repository/RepositoryRepository.java b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/repository/RepositoryRepository.java index 69c7ae4b..fb8f09f0 100644 --- a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/repository/RepositoryRepository.java +++ b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/repository/RepositoryRepository.java @@ -16,7 +16,7 @@ public interface RepositoryRepository SELECT r FROM Repository r JOIN PullRequest pr ON r.id = pr.repository.id - WHERE pr.author.login = :contributorLogin + WHERE pr.author.login ILIKE :contributorLogin ORDER BY r.name ASC """) List findContributedByLogin(@Param("contributorLogin") String contributorLogin); diff --git a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/user/UserRepository.java b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/user/UserRepository.java index 51e87c8e..d0fcc0bb 100644 --- a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/user/UserRepository.java +++ b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/gitprovider/user/UserRepository.java @@ -11,7 +11,7 @@ public interface UserRepository extends JpaRepository { @Query(""" SELECT u FROM User u - WHERE u.login = :login + WHERE u.login ILIKE :login """) Optional findByLogin(@Param("login") String login); } \ No newline at end of file diff --git a/webapp/src/app/core/header/header.component.html b/webapp/src/app/core/header/header.component.html index 4b365317..8be8e399 100644 --- a/webapp/src/app/core/header/header.component.html +++ b/webapp/src/app/core/header/header.component.html @@ -7,7 +7,7 @@ @if (signedIn()) { -