-
Notifications
You must be signed in to change notification settings - Fork 3
refactor: 깃 푸시 경로 수정 및 커밋 메세지 수정 #132
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,7 +69,7 @@ private List<Map<String, Object>> buildGitTreeEntriesFromMap( | |
| .map(s -> { | ||
| FileType fileType = FileType.valueOf(s); | ||
| String path = String.format("%s/%s/%s/%s", | ||
| repoRootFolder, req.difficulty(), req.problemId(), fileType.resolveFilename(req) | ||
| repoRootFolder, req.difficulty(), req.getProblemInfo(), fileType.resolveFilename(req) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chain기존 레포지토리 구조와의 호환성 문제 파일 경로에 문제 제목을 포함시키는 변경으로 인해 기존 폴더 구조가 깨질 수 있습니다. 기존
다음 스크립트로 경로 구성의 일관성을 확인해보세요: 🏁 Script executed: #!/bin/bash
# GitHubApiClient에서 동일한 경로 구성을 사용하는지 확인
rg -A 3 -B 3 "req\.getProblemInfo\(\)" --type java
rg -A 3 -B 3 "req\.problemId\(\)" --type javaLength of output: 3493 파일 경로 변경 시 호환성 주의 현재 하지만 기존에 – 검토 사항 🤖 Prompt for AI Agents
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 새로운 경로로 계속 이어지면 되는 겨~ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @thezz9 네, 알겠습니다! 새로운 경로 구조로 진행하시는 것으로 이해했습니다. 기존 호환성 문제에 대한 우려는 접어두고, ✏️ Learnings added
🧠 Learnings used |
||
| ); | ||
|
|
||
| String content = fileType == FileType.SOURCE | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
🛠️ Refactor suggestion
파일 경로 사용 시 문제 제목 검증 필요
getProblemInfo()메서드가 파일 경로 구성에 사용되는데, 문제 제목에 파일 시스템에서 허용되지 않는 특수 문자(/,\,:,*,?,",<,>,|)가 포함될 수 있습니다. 또한 경로 길이 제한을 초과할 가능성도 있습니다.파일 경로용 안전한 문자열을 반환하는 별도 메서드를 추가하거나, 이 메서드에서 문자 치환/제한을 고려해보세요.
public String getProblemInfo() { - return problemId + ". " + problemTitle; + return problemId + ". " + sanitizeForPath(problemTitle); +} + +private String sanitizeForPath(String title) { + return title.replaceAll("[/\\\\:*?\"<>|]", "_") + .substring(0, Math.min(title.length(), 50)); }📝 Committable suggestion
🤖 Prompt for AI Agents
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.
이건 확인했어 테스트로
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.
@thezz9 네, 테스트로 확인하셨다니 다행입니다! 현재 구현이 실제 사용 환경에서 잘 동작하고 있다면 문제없겠네요.
혹시 나중에 특수 문자가 포함된 문제 제목으로 인한 파일 경로 이슈가 발생한다면 그때 고려해보시면 될 것 같습니다.
🧠 Learnings used