Skip to content

Commit 8fa613e

Browse files
Merge pull request #134 from SemiWiki/develop
Main <- Develop
2 parents c63914e + ee0344a commit 8fa613e

24 files changed

Lines changed: 528 additions & 131 deletions

.github/ISSUE_TEMPLATE/chore.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: chore
2+
description: 변경할 잡다한 사항의 이슈를 기록하세요
3+
labels: ["chore"]
4+
body:
5+
- type: textarea
6+
id: explanation
7+
attributes:
8+
label: 변경 사
9+
description: 변경 사항의 설명을 적어주세요! (ex. - yml 변경...)
10+
placeholder: |
11+
- 변경 설명 1
12+
- 변경 설명 2
13+
- 변경 설명 3
14+
validations:
15+
required: true
16+
17+
- type: textarea
18+
id: checklist
19+
attributes:
20+
label: 체크리스트
21+
description: 체크할 체크리스트를 적어주세요. 마크다운 체크박스(- [ ] 내용)형식으로 작성하면 제출 후 체크박스로 표시됩니다. (ex. [] 유저 DB에서 체크하기...)
22+
placeholder: |
23+
- [ ] 할 일 1
24+
- [ ] 할 일 2
25+
- [ ] 할 일 3

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: feature
2+
description: 만들 기능의 이슈를 생성하세요.
3+
labels: ["feature"]
4+
body:
5+
- type: textarea
6+
id: explanation
7+
attributes:
8+
label: 개발할 기능
9+
description: 개발할 기능의 설명을 적어주세요! (ex. - 유저 도메인 개발...)
10+
placeholder: |
11+
- 기능 설명 1
12+
- 기능 설명 2
13+
- 기능 설명 3
14+
validations:
15+
required: true
16+
17+
- type: textarea
18+
id: checklist
19+
attributes:
20+
label: 체크리스트
21+
description: 체크할 체크리스트를 적어주세요. 마크다운 체크박스(- [ ] 내용)형식으로 작성하면 제출 후 체크박스로 표시됩니다. (ex. [] 유저 DB에서 체크하기...)
22+
placeholder: |
23+
- [ ] 할 일 1
24+
- [ ] 할 일 2
25+
- [ ] 할 일 3

.github/ISSUE_TEMPLATE/fix.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: feature
2+
description: 발생한 오류의 이슈를 생성하세요.
3+
labels: ["bug"]
4+
body:
5+
- type: textarea
6+
id: explanation
7+
attributes:
8+
label: 발생한 오류
9+
description: 발생한 오류의 설명을 적어주세요! (ex. - api 작동 X...)
10+
placeholder: |
11+
- 오류 설명 1
12+
- 오류 설명 2
13+
- 오류 설명 3
14+
validations:
15+
required: true
16+
17+
- type: textarea
18+
id: checklist
19+
attributes:
20+
label: 체크리스트
21+
description: 체크할 체크리스트를 적어주세요. 마크다운 체크박스(- [ ] 내용)형식으로 작성하면 제출 후 체크박스로 표시됩니다. (ex. [] 유저 DB에서 체크하기...)
22+
placeholder: |
23+
- [ ] 할 일 1
24+
- [ ] 할 일 2
25+
- [ ] 할 일 3
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: refactor
2+
description: 리팩터링할 기능의 이슈를 생성하세요.
3+
labels: ["refactor"]
4+
body:
5+
- type: textarea
6+
id: explanation
7+
attributes:
8+
label: 리팩토링할 내용
9+
description: 리팩토링할 내용을 적어주세요! (ex. - 유저 관련 코드 축소...)
10+
placeholder: |
11+
- 내용 설명 1
12+
- 내용 설명 2
13+
- 내용 설명 3
14+
validations:
15+
required: true
16+
17+
- type: textarea
18+
id: checklist
19+
attributes:
20+
label: 체크리스트
21+
description: 체크할 체크리스트를 적어주세요. 마크다운 체크박스(- [ ] 내용)형식으로 작성하면 제출 후 체크박스로 표시됩니다. (ex. [] 유저 DB에서 체크하기...)
22+
placeholder: |
23+
- [ ] 할 일 1
24+
- [ ] 할 일 2
25+
- [ ] 할 일 3
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Send notifications on PR
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
branches:
9+
- main
10+
- develop
11+
12+
jobs:
13+
send-discord-notification:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Send Discord notification
17+
env:
18+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_BE }}
19+
uses: Ilshidur/action-discord@ad5235de713df3ef38022185499b02ffe93b7efe
20+
with:
21+
args: |-
22+
<@&1399317535903453269>
23+
`[${{ github.event.pull_request.base.ref }} <- ${{ github.event.pull_request.head.ref }}]` PR이 생성되었습니다.
24+
`[생성자 : ${{ github.event.pull_request.user.login }}]`
25+
26+
${{ github.event.pull_request.html_url }}

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ dependencies {
2929
implementation 'org.springframework.boot:spring-boot-starter-web'
3030
implementation 'org.springframework.session:spring-session-data-redis'
3131
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
32+
implementation 'org.jsoup:jsoup:1.17.2'
3233
compileOnly 'org.projectlombok:lombok'
3334
runtimeOnly 'com.mysql:mysql-connector-j'
3435
annotationProcessor 'org.projectlombok:lombok'

src/main/java/com/example/semiwiki_backend/domain/auth/controller/AuthController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public class AuthController {
2424
private final DeleteUserService deleteUserService;
2525

2626

27-
28-
@PostMapping("/signup")
27+
// 회원가입은 임시적으로 막아둔 상태
28+
// @PostMapping("/signup")
2929
@ResponseStatus(HttpStatus.CREATED)
3030
public TokenResponse signUp(@RequestBody SignUpRequest signUpRequest) {
3131
return signUpService.execute(signUpRequest);
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
package com.example.semiwiki_backend.domain.notice.controller;
2+
3+
import com.example.semiwiki_backend.domain.notice.dto.request.NoticeCreateRequestDto;
4+
import com.example.semiwiki_backend.domain.notice.dto.request.NoticeUpdateRequestDto;
5+
import com.example.semiwiki_backend.domain.notice.dto.response.NoticeResponseDto;
6+
import com.example.semiwiki_backend.domain.notice.service.NoticeCreateService;
7+
import com.example.semiwiki_backend.domain.notice.service.NoticeDeleteService;
8+
import com.example.semiwiki_backend.domain.notice.service.NoticeGetService;
9+
import com.example.semiwiki_backend.domain.notice.service.NoticeUpdateService;
10+
import lombok.RequiredArgsConstructor;
11+
import org.springframework.http.HttpStatus;
12+
import org.springframework.http.ResponseEntity;
13+
import org.springframework.stereotype.Controller;
14+
import org.springframework.web.bind.annotation.*;
15+
16+
import java.util.List;
17+
18+
@Controller
19+
@RequiredArgsConstructor
20+
@RequestMapping("/notice")
21+
public class NoticeController {
22+
private final NoticeCreateService noticeCreateService;
23+
private final NoticeGetService noticeGetService;
24+
private final NoticeDeleteService noticeDeleteService;
25+
private final NoticeUpdateService noticeUpdateService;
26+
27+
@PostMapping
28+
public ResponseEntity<NoticeResponseDto> postNotice(@RequestBody NoticeCreateRequestDto noticeCreateRequestDto) {
29+
return ResponseEntity.status(HttpStatus.CREATED).body(noticeCreateService.postNotice(noticeCreateRequestDto));
30+
}
31+
32+
@GetMapping("/{id}")
33+
public ResponseEntity<NoticeResponseDto> getNotice(@PathVariable Long id) {
34+
return ResponseEntity.ok().body(noticeGetService.getNotice(id));
35+
}
36+
37+
@GetMapping
38+
public ResponseEntity<List<NoticeResponseDto>> getNoticesAll() {
39+
return ResponseEntity.ok().body(noticeGetService.getAllNotices());
40+
}
41+
42+
@PutMapping("/{id}")
43+
public ResponseEntity<NoticeResponseDto> updateNotice(@RequestBody NoticeUpdateRequestDto noticeUpdateRequestDto, @PathVariable Long id) {
44+
return ResponseEntity.ok().body(noticeUpdateService.updateNotice(noticeUpdateRequestDto, id));
45+
}
46+
47+
@DeleteMapping("/{id}")
48+
public ResponseEntity<?> deleteNotice(@PathVariable Long id) {
49+
noticeDeleteService.deleteNotice(id);
50+
return ResponseEntity.noContent().build();
51+
}
52+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.example.semiwiki_backend.domain.notice.dto.request;
2+
3+
import com.example.semiwiki_backend.domain.notice.type.Type;
4+
import lombok.Getter;
5+
6+
@Getter
7+
public class NoticeCreateRequestDto {
8+
private String title;
9+
10+
private String contents;
11+
12+
private Type type;
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.example.semiwiki_backend.domain.notice.dto.request;
2+
3+
import com.example.semiwiki_backend.domain.notice.type.Type;
4+
import lombok.Getter;
5+
6+
@Getter
7+
public class NoticeUpdateRequestDto {
8+
private String title;
9+
10+
private String contents;
11+
12+
private Type type;
13+
}

0 commit comments

Comments
 (0)