-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1118 from BCSDLab/develop
develop -> main
- Loading branch information
Showing
38 changed files
with
878 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Flyway Dangerous SQL Check | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "**" | ||
|
||
jobs: | ||
check-flyway-dangerous-sql: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Validate Dangerous SQL and Non-Flyway Changes | ||
run: | | ||
CHANGED_FILES=$( | ||
git diff --name-only \ | ||
${{ github.event.pull_request.base.sha }} \ | ||
${{ github.event.pull_request.head.sha }} | ||
) | ||
NON_FLYWAY_FILES_CHANGES=$( | ||
echo "$CHANGED_FILES" | grep -v '^src/main/resources/db.migration/' || true | ||
) | ||
DANGEROUS_SQL_COMMANDS=$( | ||
git diff --unified=0 \ | ||
${{ github.event.pull_request.base.sha }} \ | ||
${{ github.event.pull_request.head.sha }} \ | ||
-- 'src/main/resources/db.migration/**/*.sql' | \ | ||
grep -i -wE "^\+.*\b(DROP|TRUNCATE|RENAME|CONSTRAINT|MODIFY|CHANGE)\b" || true | ||
) | ||
if [[ -n "$DANGEROUS_SQL_COMMANDS" && -n "$NON_FLYWAY_FILES_CHANGES" ]]; then | ||
echo "::error:: Flyway 스크립트에서 위험한 SQL 명령어가 발견되었습니다:" | ||
echo "$DANGEROUS_SQL_COMMANDS" | ||
echo "::error:: Flyway 디렉토리를 제외하고 변경된 파일이 감지되었습니다:" | ||
echo "$NON_FLYWAY_FILES_CHANGES" | ||
exit 1 | ||
fi |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/in/koreatech/koin/admin/abtest/dto/response/AbtestAccessHistoryResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package in.koreatech.koin.admin.abtest.dto.response; | ||
|
||
import in.koreatech.koin.admin.abtest.model.AccessHistory; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
public record AbtestAccessHistoryResponse( | ||
@Schema(description = "기기 식별자") | ||
Integer accessHistoryId | ||
) { | ||
|
||
public static AbtestAccessHistoryResponse from(AccessHistory accessHistory) { | ||
return new AbtestAccessHistoryResponse(accessHistory.getId()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.