-
Notifications
You must be signed in to change notification settings - Fork 1
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
[BE] Milestone API #77
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๊ณ ํ์ จ์ต๋๋ค!๐
@@ -88,4 +88,12 @@ public void updateIssueLabels(Integer issueId, IssueLabelRequest request) { | |||
issueLabelRepository.deleteAll(toEntityList(request.getRemoveLabelsId(), | |||
id -> new IssueLabel(issueId, id))); | |||
} | |||
|
|||
public void updateIssueMilestone(Integer issueId, Integer milestoneId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Transactional
์ ๋
ธํ
์ด์
์ด ๋น ์ ธ์๋ค์!
List<IssueDetailResponse.LabelInfo> labels = findLabelInfoById(issueId); | ||
IssueDetailResponse.MilestoneInfo milestone = milestoneRepository.findMilestoneInfoByIssueId(issueId); | ||
List<LabelResponse> labels = findLabelInfoById(issueId); | ||
MilestoneResponse milestone = milestoneRepository.findMilestoneByIssueId(issueId); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํตํฉ ๐
|
||
@PostMapping("/{issueId}/milestone") | ||
public void updateIssueMilestone(@PathVariable Integer issueId, | ||
@RequestBody IssueMilestoneRequest milestoneRequest) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด์ ์๋ ๋ชป๋ดค์๋๋ฐ ๋ฐํํ์
์ด void
์ธ๋ฐ ResponseEntity<Void>
๋ก ํตํฉํ๋ ๊ฑด ์ด๋ป๊ฒ ์๊ฐํ์๋์!
@Getter | ||
@NoArgsConstructor | ||
public class IssueMilestoneRequest { | ||
private Integer milestoneId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ ์ค ๋์์ฃผ์ธ์ฉใ ใ
public class IssueMilestoneRequest {
private Integer milestoneId;
|
||
@DisplayName("ํน์ ์ด์์ ๋ง์ผ์คํค์ ์์ ํ ์ ์๋ค.") | ||
@Test | ||
public void updateIssueMilestone() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JUnit5 ๋ถํฐ๋ ์ ๊ทผ์ ์ด์๋ฅผ public
์ผ๋ก ์ํด๋ ํ
์คํธ๊ฐ ์ํ๋ฉ๋๋น!
void updateIssueMilestone() {
...
}
https://junit.org/junit5/docs/snapshot/user-guide/#writing-tests-classes-and-methods
|
||
MapSqlParameterSource params = new MapSqlParameterSource() | ||
.addValue("milestoneId", milestoneId) | ||
.addValue("issueId", issueId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฌ๊ธฐ์ Map.of()
๋ฅผ ์ฌ์ฉํ ๋milestoneId
ํน์ issueId
๊ฐ null์ด๋ฉด NPE๊ฐ ๋ฐ์ํ๋ค๋ ๊ฑด๊ฐ์?
@@ -59,4 +60,10 @@ public void updateAssignees(@PathVariable Integer issueId, @RequestBody Assignee | |||
public void updateIssueLabels(@PathVariable Integer issueId, @RequestBody IssueLabelRequest issueLabelRequest) { | |||
issueService.updateIssueLabels(issueId, issueLabelRequest); | |||
} | |||
|
|||
@PostMapping("/{issueId}/milestone") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notion API ๋ฌธ์์๋ PUT
์ผ๋ก ๋์ด ์๋๋ฐ POST
๋ก ๋ฐ๋๊ฑด๊ฐ์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐๐ผ ์ ๋ดค์ต๋๋ค !
Issues
What is this PR? ๐
Key changes ๐
To reviewers ๐