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

fix: 여러 단계를 한 번에 제출한 유저의 PR이 한 개만 생성되는 문제 #15

Merged
merged 1 commit into from
Oct 8, 2023
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
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);

}
Loading