Skip to content

Commit

Permalink
fix: 여러 단계를 한 번에 제출한 유저의 PR이 한 개만 생성되는 문제
Browse files Browse the repository at this point in the history
  • Loading branch information
wonyongChoi05 committed Oct 8, 2023
1 parent 939d184 commit 8eaa696
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private List<Long> getStepInTitle(final String title) {

private void isNotExistSave(final List<PullRequest> newPrs) {
for (PullRequest newPr : newPrs) {
if (!pullRequestRepository.existsByTitle(newPr.getTitle())) {
if (!pullRequestRepository.existsByStepIdAndTitle(newPr.getStepId(), newPr.getTitle())) {
pullRequestRepository.save(newPr);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

public interface PullRequestRepository extends JpaRepository<PullRequest, Long> {

boolean existsByTitle(final String title);
boolean existsByStepIdAndTitle(final Long stepId, final String title);

}

0 comments on commit 8eaa696

Please sign in to comment.